net.sourceforge.nite.nstyle.handler
Class TextStyleHandler

java.lang.Object
  extended by net.sourceforge.nite.nstyle.handler.NDisplayObjectHandler
      extended by net.sourceforge.nite.nstyle.handler.TextStyleHandler

public class TextStyleHandler
extends NDisplayObjectHandler

Author:
judyr This is used to process a document style specified for TextAreas. There is also functionality for setting up fonts and colours in the JComponentHandler. These styles are only for specifying text styles for a document. They must be named for use by text elements

Constructor Summary
TextStyleHandler()
           
 
Method Summary
 void addChild(NDisplayObjectHandler child)
          The font styles should never have children, so this method does nothing
 javax.swing.text.Style getColours(javax.swing.text.Style sty, java.lang.String fcol, java.lang.String bcol)
          Sets the foreground and background colours of the style
 java.lang.String getName()
          Returns the name.
 javax.swing.text.Style getStyle()
          Returns the style.
 void makeNewStyle()
           
 javax.swing.text.Style setColours(javax.swing.text.Style sty, java.lang.String fcol, java.lang.String bcol)
          Sets the foreground and background colours of the style
 void setName(java.lang.String name)
          Sets the name.
 void setStyle(javax.swing.text.Style style)
          Sets the style.
 
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

TextStyleHandler

public TextStyleHandler()
Method Detail

getColours

public javax.swing.text.Style getColours(javax.swing.text.Style sty,
                                         java.lang.String fcol,
                                         java.lang.String bcol)
Sets the foreground and background colours of the style


setColours

public javax.swing.text.Style setColours(javax.swing.text.Style sty,
                                         java.lang.String fcol,
                                         java.lang.String bcol)
Sets the foreground and background colours of the style


makeNewStyle

public void makeNewStyle()

addChild

public void addChild(NDisplayObjectHandler child)
The font styles should never have children, so this method does nothing

Specified by:
addChild in class NDisplayObjectHandler
Parameters:
child - The child to add.

getName

public java.lang.String getName()
Returns the name.

Returns:
String

getStyle

public javax.swing.text.Style getStyle()
Returns the style.

Returns:
Style

setName

public void setName(java.lang.String name)
Sets the name.

Parameters:
name - The name to set

setStyle

public void setStyle(javax.swing.text.Style style)
Sets the style.

Parameters:
style - The style to set