net.sourceforge.nite.nstyle.handler
Class GridPanelHandler

java.lang.Object
  extended by net.sourceforge.nite.nstyle.handler.NDisplayObjectHandler
      extended by net.sourceforge.nite.nstyle.handler.JComponentHandler
          extended by net.sourceforge.nite.nstyle.handler.GridPanelHandler
All Implemented Interfaces:
OutputComponent

public class GridPanelHandler
extends JComponentHandler
implements OutputComponent

Author:
judyr

Constructor Summary
GridPanelHandler()
           
 
Method Summary
 void addChild(NDisplayObjectHandler child)
          In an implementation-specific manner, add the supplied child NDisplayObjectHandler to this one.
 javax.swing.JComponent displayElement(ObjectModelElement e, boolean selected)
          Display this element on the user interface
 void insertDisplayElement(ObjectModelElement newElement, ObjectModelElement parent, int position)
          Used to update the display after an addChild operation.
 void redisplayElement(ObjectModelElement e)
          Used to refresh the display of an element on the screen after changes to textual content or attribute values on underlying xml
 void removeDisplayComponent(ObjectModelElement e)
          Remove the on screen representation of an element once it has been removed from the object model
 java.awt.Color setUpBackgroundColour()
          This needs it's own method for this, so it can set the internal panel to the background colour rather than the scroll pnae itself
 
Methods inherited from class net.sourceforge.nite.nstyle.handler.JComponentHandler
addActionReference, getImage, getJComponent, registerAction, setImage, setUpFont, setUpForegroundColour, setUpImage, setUpToolTip
 
Methods inherited from class net.sourceforge.nite.nstyle.handler.NDisplayObjectHandler
addActionReference, getActionReferences, getChildren, getClock, getElement, getEndTime, getID, getParent, getSourceID, getStartTime, init, setChildren, setClock, setElement, setEndTime, setID, setParent, setSourceID, setStartTime, setUpTimes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridPanelHandler

public GridPanelHandler()
Method Detail

setUpBackgroundColour

public java.awt.Color setUpBackgroundColour()
This needs it's own method for this, so it can set the internal panel to the background colour rather than the scroll pnae itself

Overrides:
setUpBackgroundColour in class JComponentHandler

addChild

public void addChild(NDisplayObjectHandler child)
Description copied from class: NDisplayObjectHandler
In an implementation-specific manner, add the supplied child NDisplayObjectHandler to this one.

Overrides:
addChild in class JComponentHandler
Parameters:
child - The child to add.
See Also:
net.sourceforge.net.sourceforge.nite.nstyle.handler.NDisplayObjectHandler#addChild(net.sourceforge.net.sourceforge.nite.nstyle.handler.NDisplayObjectHandler)

displayElement

public javax.swing.JComponent displayElement(ObjectModelElement e,
                                             boolean selected)
Description copied from interface: OutputComponent
Display this element on the user interface

Specified by:
displayElement in interface OutputComponent

redisplayElement

public void redisplayElement(ObjectModelElement e)
Description copied from interface: OutputComponent
Used to refresh the display of an element on the screen after changes to textual content or attribute values on underlying xml

Specified by:
redisplayElement in interface OutputComponent
Parameters:
e - The element which should have its representation refreshed.

removeDisplayComponent

public void removeDisplayComponent(ObjectModelElement e)
Description copied from interface: OutputComponent
Remove the on screen representation of an element once it has been removed from the object model

Specified by:
removeDisplayComponent in interface OutputComponent

insertDisplayElement

public void insertDisplayElement(ObjectModelElement newElement,
                                 ObjectModelElement parent,
                                 int position)
Description copied from interface: OutputComponent
Used to update the display after an addChild operation. Place the new element "after" the positionth child of the parent element. After is easily defined a tree component, but it is far less obvious how this shoud be implemented for text areas.

Specified by:
insertDisplayElement in interface OutputComponent
Parameters:
newElement - The element which is to be inserted
parent - The parent of the element to be added
position - The index into the list of children belonging to the parent