proper.gui.experiment
Class BuilderPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by proper.gui.core.panel.ProperPanel
                      extended by proper.gui.experiment.BuilderPanel
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener, javax.swing.event.DocumentListener, XMLAccessInterface
Direct Known Subclasses:
BuilderProperties, BuilderSteps, BuilderTabPanel

public class BuilderPanel
extends ProperPanel
implements java.awt.event.ItemListener, javax.swing.event.ChangeListener, XMLAccessInterface

This panel represents a panel for the Builder that is added as a Tab in a JTabbedPane.

Version:
$Revision: 1.3 $
Author:
FracPete
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
BuilderPanel(Builder parent, java.lang.String name)
          initializes the panel
 
Method Summary
 void addParameter(BuilderParameter param)
          adds the parameter to the list of parameters to display in this panel.
 void changedUpdate(javax.swing.event.DocumentEvent e)
          Gives notification that an attribute or set of attributes changed.
 java.util.Vector check()
          returns a vector containing strings stating which fields don't meet the requirements
 void clear()
          resets the panel to its default values
 void fromXML(Element node)
          sets the data contained in this node, i.e.
 java.lang.String getClassname()
          returns the classname to use in the javacall
 Connector getConnector()
          returns the connector
 java.lang.String getName()
          returns the name of the panel
 java.lang.String getNote()
          returns the currently displayed note
 BuilderParameter getParameter(javax.swing.JComponent component)
          returns the parameter based on the GUI component it represents, can be NULL
 BuilderParameter getParameter(java.lang.String parameter)
          returns the parameter based on its commandline name, can be NULL
 java.util.Vector getParameters()
          returns the stored parameter-objects
 Builder getParentFrame()
          returns the owner of this panel
 void insertUpdate(javax.swing.event.DocumentEvent e)
          Gives notification that there was an insert into the document.
 boolean isChanged()
          returns whether anything in this panel was changed
 void itemStateChanged(java.awt.event.ItemEvent e)
          Invoked when an item has been selected or deselected by the user.
 boolean needsDatabase()
          returns whether this panel needs the database
 void removeUpdate(javax.swing.event.DocumentEvent e)
          Gives notification that a portion of the document has been removed.
 void setChanged(boolean changed)
          sets the changed state of this panel
 void setClassname(java.lang.String classname)
          sets the classname to use in the javacall
 void setConnector(Connector conn)
          sets the connector reference
 void setEnabled(boolean enabled)
          sets also the enabled state of all children
 void setNeedsDatabase(boolean needsDatabase)
          whether this panel needs the database, i.e.
 void setNote(java.lang.String note)
          sets the note, displayed on the bottom of the Panel
 void setVisible(boolean visible)
          sets also the visible state of all children
 void stateChanged(javax.swing.event.ChangeEvent e)
          Invoked when the target of the listener has changed its state.
 Element toXML()
          returns the content of the panel as XML-Node
 
Methods inherited from class proper.gui.core.panel.ProperPanel
actionPerformed, getTitle, hasBorder, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, setActionListener, setBorder, setKeyListener, setTitle, showMessageBox, showMessageBox
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BuilderPanel

public BuilderPanel(Builder parent,
                    java.lang.String name)
initializes the panel

Parameters:
parent - the parent of this panel
name - the name of this panel
Method Detail

getParentFrame

public Builder getParentFrame()
returns the owner of this panel


getName

public java.lang.String getName()
returns the name of the panel

Overrides:
getName in class java.awt.Component

setChanged

public void setChanged(boolean changed)
sets the changed state of this panel


isChanged

public boolean isChanged()
returns whether anything in this panel was changed


setEnabled

public void setEnabled(boolean enabled)
sets also the enabled state of all children

Overrides:
setEnabled in class javax.swing.JComponent

setVisible

public void setVisible(boolean visible)
sets also the visible state of all children

Overrides:
setVisible in class javax.swing.JComponent

setNote

public void setNote(java.lang.String note)
sets the note, displayed on the bottom of the Panel


getNote

public java.lang.String getNote()
returns the currently displayed note


setConnector

public void setConnector(Connector conn)
sets the connector reference


getConnector

public Connector getConnector()
returns the connector


setNeedsDatabase

public void setNeedsDatabase(boolean needsDatabase)
whether this panel needs the database, i.e. additional tags in the XML concerning the database


needsDatabase

public boolean needsDatabase()
returns whether this panel needs the database


setClassname

public void setClassname(java.lang.String classname)
sets the classname to use in the javacall


getClassname

public java.lang.String getClassname()
returns the classname to use in the javacall


addParameter

public void addParameter(BuilderParameter param)
adds the parameter to the list of parameters to display in this panel. it also automatically sets the necessary listeners for changes.


getParameter

public BuilderParameter getParameter(java.lang.String parameter)
returns the parameter based on its commandline name, can be NULL


getParameter

public BuilderParameter getParameter(javax.swing.JComponent component)
returns the parameter based on the GUI component it represents, can be NULL


getParameters

public java.util.Vector getParameters()
returns the stored parameter-objects


clear

public void clear()
resets the panel to its default values


check

public java.util.Vector check()
returns a vector containing strings stating which fields don't meet the requirements


fromXML

public void fromXML(Element node)
sets the data contained in this node, i.e. extracts the arg-tags from this java-tag

Specified by:
fromXML in interface XMLAccessInterface
Parameters:
node - the Element node containing the data in its children

toXML

public Element toXML()
returns the content of the panel as XML-Node

Specified by:
toXML in interface XMLAccessInterface
Returns:
the Element containing the data in its children

changedUpdate

public void changedUpdate(javax.swing.event.DocumentEvent e)
Gives notification that an attribute or set of attributes changed.

Specified by:
changedUpdate in interface javax.swing.event.DocumentListener
Overrides:
changedUpdate in class ProperPanel

insertUpdate

public void insertUpdate(javax.swing.event.DocumentEvent e)
Gives notification that there was an insert into the document.

Specified by:
insertUpdate in interface javax.swing.event.DocumentListener
Overrides:
insertUpdate in class ProperPanel

removeUpdate

public void removeUpdate(javax.swing.event.DocumentEvent e)
Gives notification that a portion of the document has been removed.

Specified by:
removeUpdate in interface javax.swing.event.DocumentListener
Overrides:
removeUpdate in class ProperPanel

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Invoked when an item has been selected or deselected by the user.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Overrides:
itemStateChanged in class ProperPanel

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Invoked when the target of the listener has changed its state.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener
Overrides:
stateChanged in class ProperPanel