ix.iview
Class GlobalFormPanel

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 ix.iface.ui.IFormPanel
                      extended by ix.iview.GlobalFormPanel
All Implemented Interfaces:
FormModelListener, ConstructEditing, UIDomainListener, java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ListSelectionListener

public class GlobalFormPanel
extends IFormPanel
implements ConstructEditing, UIDomainListener, javax.swing.event.ListSelectionListener

A panel containing form-style sub-panels for viewing/editing an object

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class ix.iface.ui.IFormPanel
IFormPanel.FieldChooser
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
(package private)  java.util.HashSet actionListeners
          Listeners interested in the current action
 IXTreeTable table
           
 
Fields inherited from class ix.iface.ui.IFormPanel
displayBits, fieldRenderers, hideBits, listeners, model, nameBits, simpleFields
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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
GlobalFormPanel(AConstructFramePanel theParent)
           
GlobalFormPanel(AConstructFramePanel theParent, IFormModel m)
           
 
Method Summary
 void addCurrentActionListener(CurrentActionListener cal)
           
 void constructAdded(DomainEvent e)
           
 void constructAdded(UIDomainEvent e)
          Called when a UI construct is added.
 void constructEdited(UIDomainEvent e)
          Called when a UI construct is edited.
 void constructRemoved(UIDomainEvent e)
          Called when a UI construct is removed.
 void domainCleared(UIDomainEvent e)
          Called when the domain is cleared.
 void domainEdited(UIDomainEvent e)
          Called when the domain's own fields changed (currently only name).
 void domainSet(UIDomainEvent e)
          Called when the domain is added.
 IXObject getConstruct()
          Gets the current construct.
 java.lang.Object getFieldData(java.lang.String field)
          reads panel components
 boolean getSort()
           
 UIObject getUIConstruct()
          Gets the current UI construct.
 UIDomain getUIDomain()
          Gets the current UIDomain.
 void loadFromObject()
          Saves the data from the panel into the current object.
protected  IXEditorPanel makeDisplayBit(java.lang.String field)
          Makes a display panel with the name as its label and a suitable item.
 void reactingActionChange(boolean flag)
           
 void refinementAdded(RefinementEvent e)
           
 void refinementRemoved(RefinementEvent e)
           
 void saveFieldData(java.lang.String field)
          Saves the field's value from its display component into the model's object.
 void setConstruct(IXObject construct)
          Sets the current construct.
 void setFieldData(java.lang.String field, java.lang.Object value)
          Sets the given data of the given field in the panel.
protected  void setRenderers()
          Sets the renderers to be added to the panel items (lists) of fiels.
 void setSelectedAction(UIRefinement newAction)
           
 void setSort(boolean sortIt)
           
 void setUIConstruct(UIObject construct)
          Sets the current UI construct.
 void setUIConstructOnly(UIObject construct)
          Sets the current UI construct without noting changes.
 void updateList()
           
 void updateTable()
          Todo: preserve expansions
 void valueChanged(javax.swing.event.ListSelectionEvent lse)
           
 
Methods inherited from class ix.iface.ui.IFormPanel
actionPerformed, addFormActionListener, clear, clearBits, clearField, clearFields, deRenderValue, displayFieldData, displayModelData, editFields, ensurePanelBits, formModelChanged, getFieldBit, getModel, gotConstraint, hideBits, isListField, isSimpleField, renderValue, saveToObject, saveToObject, setHideBits, setModel, setModel, setRenderer, setSimpleField, unsetSimpleField, updateHideBits, updateNames
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, 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, getName, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ix.iview.ConstructEditing
saveToObject
 

Field Detail

table

public IXTreeTable table

actionListeners

java.util.HashSet actionListeners
Listeners interested in the current action

Constructor Detail

GlobalFormPanel

public GlobalFormPanel(AConstructFramePanel theParent)

GlobalFormPanel

public GlobalFormPanel(AConstructFramePanel theParent,
                       IFormModel m)
Method Detail

setRenderers

protected void setRenderers()
Description copied from class: IFormPanel
Sets the renderers to be added to the panel items (lists) of fiels. To be overridden by sub-classes.

Overrides:
setRenderers in class IFormPanel

makeDisplayBit

protected IXEditorPanel makeDisplayBit(java.lang.String field)
Description copied from class: IFormPanel
Makes a display panel with the name as its label and a suitable item. The item to display the fields will be:

Overrides:
makeDisplayBit in class IFormPanel

saveFieldData

public void saveFieldData(java.lang.String field)
Description copied from class: IFormPanel
Saves the field's value from its display component into the model's object.

Overrides:
saveFieldData in class IFormPanel

getFieldData

public java.lang.Object getFieldData(java.lang.String field)
reads panel components

Overrides:
getFieldData in class IFormPanel

setFieldData

public void setFieldData(java.lang.String field,
                         java.lang.Object value)
Description copied from class: IFormPanel
Sets the given data of the given field in the panel. Renders the data first.

Overrides:
setFieldData in class IFormPanel

refinementAdded

public void refinementAdded(RefinementEvent e)

refinementRemoved

public void refinementRemoved(RefinementEvent e)

constructAdded

public void constructAdded(DomainEvent e)
Specified by:
constructAdded in interface UIDomainListener

constructAdded

public void constructAdded(UIDomainEvent e)
Description copied from interface: UIDomainListener
Called when a UI construct is added. Use getSource() to get at the domain (UI/IX) in which the event occurred. Use getObject() to get at the object (UI/IX) that has been added.

Specified by:
constructAdded in interface UIDomainListener

constructRemoved

public void constructRemoved(UIDomainEvent e)
Description copied from interface: UIDomainListener
Called when a UI construct is removed. Use getSource() to get at the UIDomain in which the event occurred. Use getObject() to get at the UIObject that has been removed.

Specified by:
constructRemoved in interface UIDomainListener

constructEdited

public void constructEdited(UIDomainEvent e)
Description copied from interface: UIDomainListener
Called when a UI construct is edited. Use getSource() to get at the UIDomain in which the event occurred. Use getObject() to get at the UIObject that has been edited.

Specified by:
constructEdited in interface UIDomainListener

domainCleared

public void domainCleared(UIDomainEvent e)
Description copied from interface: UIDomainListener
Called when the domain is cleared.

Specified by:
domainCleared in interface UIDomainListener

domainEdited

public void domainEdited(UIDomainEvent e)
Description copied from interface: UIDomainListener
Called when the domain's own fields changed (currently only name).

Specified by:
domainEdited in interface UIDomainListener

domainSet

public void domainSet(UIDomainEvent e)
Description copied from interface: UIDomainListener
Called when the domain is added.

Specified by:
domainSet in interface UIDomainListener

setSort

public void setSort(boolean sortIt)

getSort

public boolean getSort()

updateTable

public void updateTable()
Todo: preserve expansions


updateList

public void updateList()

getUIDomain

public UIDomain getUIDomain()
Description copied from interface: ConstructEditing
Gets the current UIDomain.

Specified by:
getUIDomain in interface ConstructEditing

setConstruct

public void setConstruct(IXObject construct)
Description copied from interface: ConstructEditing
Sets the current construct.

Specified by:
setConstruct in interface ConstructEditing

getConstruct

public IXObject getConstruct()
Description copied from interface: ConstructEditing
Gets the current construct.

Specified by:
getConstruct in interface ConstructEditing

setUIConstruct

public void setUIConstruct(UIObject construct)
Description copied from interface: ConstructEditing
Sets the current UI construct. Remember to parent.fireConstructChanged(old, new)

Specified by:
setUIConstruct in interface ConstructEditing

setUIConstructOnly

public void setUIConstructOnly(UIObject construct)
Description copied from interface: ConstructEditing
Sets the current UI construct without noting changes. Remember to parent.fireConstructChanged(old, new)

Specified by:
setUIConstructOnly in interface ConstructEditing

getUIConstruct

public UIObject getUIConstruct()
Description copied from interface: ConstructEditing
Gets the current UI construct.

Specified by:
getUIConstruct in interface ConstructEditing

loadFromObject

public void loadFromObject()
Description copied from interface: ConstructEditing
Saves the data from the panel into the current object.

Specified by:
loadFromObject in interface ConstructEditing

valueChanged

public void valueChanged(javax.swing.event.ListSelectionEvent lse)
Specified by:
valueChanged in interface javax.swing.event.ListSelectionListener

addCurrentActionListener

public void addCurrentActionListener(CurrentActionListener cal)

reactingActionChange

public void reactingActionChange(boolean flag)

setSelectedAction

public void setSelectedAction(UIRefinement newAction)