ks.common.view
Class StringView

java.lang.Object
  extended byks.common.view.Widget
      extended byks.common.view.StringView
All Implemented Interfaces:
ElementListener

public class StringView
extends Widget

A Widget for displaying a string.


Constructor Summary
StringView(MutableString value)
          Construct view of this String model.
StringView(java.lang.String value)
          Construct view of this String.
 
Method Summary
 java.awt.Color getColor()
          Get the color used within this StringView
 java.awt.Font getFont()
          Get the font used within this StringView
 int getFontSize()
          Return size of font being used.
 void redraw()
          Create image if we must.
 void setColor(java.awt.Color newColor)
          Set the color for use within this StringView.
 void setFont(java.awt.Font newFont)
          Set the font for use within this StringView; also updates fontSize
 void setFontSize(int newFontSize)
          Set the size of the font to be used within this StringView.
 
Methods inherited from class ks.common.view.Widget
getBounds, getCardImages, getContainer, getHeight, getImage, getModelElement, getMouseManager, getName, getWidth, getX, getXY, getY, inBounds, isDirty, modelChanged, paint, paint, paint, refresh, refresh, returnWidget, setBounds, setBounds, setContainer, setDirty, setHeight, setImage, setMouseAdapter, setMouseManager, setMouseMotionAdapter, setName, setUndoAdapter, setWidth, setX, setXY, setY, toString, translate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringView

public StringView(MutableString value)
Construct view of this String model.


StringView

public StringView(java.lang.String value)
Construct view of this String.

Method Detail

getColor

public java.awt.Color getColor()
Get the color used within this StringView

Returns:
java.awt.Color

getFont

public java.awt.Font getFont()
Get the font used within this StringView

Returns:
java.awt.Font

getFontSize

public int getFontSize()
Return size of font being used.

Returns:
int

redraw

public void redraw()
Create image if we must. The existing Image is cleared and reused.

Specified by:
redraw in class Widget

setColor

public void setColor(java.awt.Color newColor)
Set the color for use within this StringView.

Parameters:
newColor - java.awt.Color

setFont

public void setFont(java.awt.Font newFont)
Set the font for use within this StringView; also updates fontSize

Parameters:
newFont - java.awt.Font

setFontSize

public void setFontSize(int newFontSize)
Set the size of the font to be used within this StringView. All other attributes of the existing font are kept the same.

Parameters:
newFontSize - int