com.neuron.app.tonto
Class CCFFrame

java.lang.Object
  extended by com.neuron.app.tonto.CCFNode
      extended by com.neuron.app.tonto.CCFFrame
All Implemented Interfaces:
IChildContainer, INamed, java.lang.Cloneable

public class CCFFrame
extends CCFNode
implements IChildContainer, INamed

A container class similar to CCFPanel since CCFPanels cannot nest. They are usually used to organize buttons but they can also be assigned an Icon.


Field Summary
 
Fields inherited from class com.neuron.app.tonto.CCFNode
TEXT_CENTER, TEXT_LEFT, TEXT_RIGHT
 
Method Summary
 void addButton(CCFButton b)
          Add child to this frame.
 void addChild(CCFChild c)
          Add child to this frame.
 void addFrame(CCFFrame f)
          Add child to this frame.
 void convertToColor()
           
 void convertToGray()
           
 CCFButton createButton(java.lang.String name)
          Create a button.
 CCFFrame createFrame(java.lang.String name)
          Create a frame.
 void delete()
          Deletes this child from it's parent.
 CCFColor getBackground()
          Get the frame background color.
 CCFChild[] getChildren()
          Gets the contents of this frame.
 CCFChild getChildWrapper()
           
 CCFFont getFont()
          Get the CCFFont for this Button.
 CCFColor getForeground()
          Get the frame foreground color.
 CCFIcon getIcon()
          Get the background icon associated with this frame.
 java.awt.Point getLocation()
           
 java.lang.String getName()
          Get the name of this frame.
 java.awt.Dimension getSize()
          Returns the size of this frame in pixels.
 int getTextAlignment()
           
 boolean getTextWrap()
           
 boolean isResizable()
          Returns true if this frame is resizable.
 void setBackground(CCFColor color)
          Set the frame background color.
 void setChildren(CCFChild[] c)
          Sets the contents of this frame.
 void setFont(CCFFont font)
          Set the CCFFont for this Button.
 void setForeground(CCFColor color)
          Set the frame foreground color.
 void setIcon(CCFIcon icon)
          Set the background icon associated with this frame.
 void setLocation(java.awt.Point p)
           
 void setName(java.lang.String name)
          Set the name of this frame.
 void setParent(CCFNode p)
           
 void setSize(java.awt.Dimension size)
          Sets the new size for this frame.
 void setTextAlignment(int align)
           
 void setTextWrap(boolean w)
           
 java.lang.String toString()
           
 
Methods inherited from class com.neuron.app.tonto.CCFNode
getHeader, getParent, getParentDevice, getParentPanel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

setParent

public void setParent(CCFNode p)

getTextAlignment

public int getTextAlignment()

setTextAlignment

public void setTextAlignment(int align)

getTextWrap

public boolean getTextWrap()

setTextWrap

public void setTextWrap(boolean w)

convertToColor

public void convertToColor()

convertToGray

public void convertToGray()

getName

public java.lang.String getName()
Get the name of this frame.

Specified by:
getName in interface INamed

setName

public void setName(java.lang.String name)
Set the name of this frame.


createButton

public CCFButton createButton(java.lang.String name)
Create a button. It must be added to the frame manually.


createFrame

public CCFFrame createFrame(java.lang.String name)
Create a frame. It must be added to the frame manually.


getFont

public CCFFont getFont()
Get the CCFFont for this Button.


setFont

public void setFont(CCFFont font)
Set the CCFFont for this Button.

Parameters:
font - new button font

getBackground

public CCFColor getBackground()
Get the frame background color.


setBackground

public void setBackground(CCFColor color)
Set the frame background color.

Parameters:
color - background color

getForeground

public CCFColor getForeground()
Get the frame foreground color.


setForeground

public void setForeground(CCFColor color)
Set the frame foreground color.

Parameters:
color - foreground color

getIcon

public CCFIcon getIcon()
Get the background icon associated with this frame.


setIcon

public void setIcon(CCFIcon icon)
Set the background icon associated with this frame.

Parameters:
icon - new background icon

getChildren

public CCFChild[] getChildren()
Gets the contents of this frame.

Specified by:
getChildren in interface IChildContainer

setChildren

public void setChildren(CCFChild[] c)
Sets the contents of this frame.

Specified by:
setChildren in interface IChildContainer
Parameters:
c - new contents of this frame

addChild

public void addChild(CCFChild c)
Add child to this frame.


addButton

public void addButton(CCFButton b)
Add child to this frame.

Specified by:
addButton in interface IChildContainer

addFrame

public void addFrame(CCFFrame f)
Add child to this frame.

Specified by:
addFrame in interface IChildContainer

getSize

public java.awt.Dimension getSize()
Returns the size of this frame in pixels.


setSize

public void setSize(java.awt.Dimension size)
Sets the new size for this frame. This has no effect if the frame uses an Icon since the Icons's size will override this setting.


getChildWrapper

public CCFChild getChildWrapper()

getLocation

public java.awt.Point getLocation()

setLocation

public void setLocation(java.awt.Point p)

isResizable

public boolean isResizable()
Returns true if this frame is resizable. The frame will not be resizable if it has an icon set.


delete

public void delete()
Deletes this child from it's parent.


toString

public java.lang.String toString()
Overrides:
toString in class CCFNode