net.sourceforge.nite.nstyle.handler
Class JComponentHandler

java.lang.Object
  extended by net.sourceforge.nite.nstyle.handler.NDisplayObjectHandler
      extended by net.sourceforge.nite.nstyle.handler.JComponentHandler
Direct Known Subclasses:
AddChildOptionPane, AddSiblingOptionPane, AltChangeAttributeValuePopup, ButtonHandler, ChangeAttributeValueOptionPane, ChangeAttributeValuePopup, ChangeTextualContentOptionPane, CheckBoxHandler, GridElementHandler, GridPanelHandler, InternalFrameHandler, LabelHandler, ListHandler, OptionPaneHandler, PanelHandler, ScrollPaneHandler, SplitPaneHandler, TabbedPaneHandler, TextAreaHandler, TextElementHandler, TextFieldHandler, TimedLabelHandler, TreeHandler

public abstract class JComponentHandler
extends NDisplayObjectHandler

Author:
Judy Robertson

Constructor Summary
JComponentHandler()
           
 
Method Summary
 void addActionReference(NActionReferenceHandler ref)
          adds a reference to an action for this component, so that the action is fired when the appropriate key press / mouse click occurs
 void addChild(NDisplayObjectHandler child)
          In an implementation-specific manner, add the supplied child NDisplayObjectHandler to this one.
 javax.swing.ImageIcon getImage()
          Returns the image.
 javax.swing.JComponent getJComponent()
           
 void registerAction(java.lang.String binding, NiteAction a)
          This is used to register an action listener for the action; well, in fact it's overridden by every class that extends this, so it's not really!
 void setImage(javax.swing.ImageIcon image)
          Sets the image.
 java.awt.Color setUpBackgroundColour()
          Use the background colour information specified in the properties componentToData to set the colours on the JComponent
 java.awt.Font setUpFont()
          Use the font information specified in the properties componentToData to set the font on the JComponent
 java.awt.Color setUpForegroundColour()
          Use the foreground colour information specified in the properties componentToData to set the colours on the JComponent
 void setUpImage()
          Use the imagepath specified in the properties componentToData to set up the image for the JComponent
 void setUpToolTip()
          Use the string specified in the properties componentToData to set up tooltip text
 
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

JComponentHandler

public JComponentHandler()
Method Detail

registerAction

public void registerAction(java.lang.String binding,
                           NiteAction a)
This is used to register an action listener for the action; well, in fact it's overridden by every class that extends this, so it's not really!


addChild

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

Specified by:
addChild in class NDisplayObjectHandler
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)

addActionReference

public void addActionReference(NActionReferenceHandler ref)
adds a reference to an action for this component, so that the action is fired when the appropriate key press / mouse click occurs


getJComponent

public javax.swing.JComponent getJComponent()

setUpFont

public java.awt.Font setUpFont()
Use the font information specified in the properties componentToData to set the font on the JComponent


setUpForegroundColour

public java.awt.Color setUpForegroundColour()
Use the foreground colour information specified in the properties componentToData to set the colours on the JComponent


setUpBackgroundColour

public java.awt.Color setUpBackgroundColour()
Use the background colour information specified in the properties componentToData to set the colours on the JComponent


setUpImage

public void setUpImage()
Use the imagepath specified in the properties componentToData to set up the image for the JComponent


setUpToolTip

public void setUpToolTip()
Use the string specified in the properties componentToData to set up tooltip text


getImage

public javax.swing.ImageIcon getImage()
Returns the image.

Returns:
ImageIcon

setImage

public void setImage(javax.swing.ImageIcon image)
Sets the image.

Parameters:
image - The image to set