JHotDraw 7.1

org.jhotdraw.draw
Interface TextHolderFigure

All Superinterfaces:
java.lang.Cloneable, DOMStorable, Figure, java.io.Serializable
All Known Implementing Classes:
LabelFigure, NodeFigure, SVGTextAreaFigure, SVGTextFigure, TextAreaFigure, TextFigure

public interface TextHolderFigure
extends Figure

The interface of a figure that has some editable text contents.

Version:
2.1 2007-05-19 Added method isTextOverflow.
2.0 2006-01-14 Changed to support double precison coordinates.
1.0 2003-12-01 Derived from JHotDraw 5.4b1.
Author:
Werner Randelshofer

Method Summary
 java.awt.Color getFillColor()
          Returns the fill color to be used by a text editor for editing this Figure.
 java.awt.Font getFont()
          Returns the font to be used by a text editor for editing this Figure.
 float getFontSize()
          Gets the font size of the text held by the TextHolderFigure.
 Insets2D.Double getInsets()
          Returns Insets to be used by the text editor relative to the handle bounds of the figure.
 TextHolderFigure getLabelFor()
          Sometimes we want to use a TextHolderFigure as a label for another TextHolderFigure.
 int getTabSize()
          Gets the number of characters used to expand tabs.
 java.lang.String getText()
          Returns the text held by the Text Holder.
 java.awt.Color getTextColor()
          Returns the text color to be used by a text editor for editing this Figure.
 int getTextColumns()
          Gets the number of columns to be overlaid when the figure is edited.
 boolean isEditable()
          Returns true if the text of the TextHolderFigure can be edited.
 boolean isTextOverflow()
          Returns true, if the text does not fit into the bounds of the Figure.
 void setFontSize(float size)
          Sets the font size of the text held by the TextHolderFigure.
 void setText(java.lang.String text)
           
 
Methods inherited from interface org.jhotdraw.draw.Figure
addFigureListener, addNotify, canConnect, changed, clone, contains, createHandles, draw, findCompatibleConnector, findConnector, findFigureInside, getActions, getAttribute, getAttributes, getAttributesRestoreData, getBounds, getConnectors, getCursor, getDecomposition, getDrawingArea, getEndPoint, getLayer, getPreferredSize, getStartPoint, getTool, getToolTipText, getTransformRestoreData, handleDrop, handleMouseClick, includes, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removeNotify, requestRemove, restoreAttributesTo, restoreTransformTo, setAttribute, setBounds, transform, willChange
 
Methods inherited from interface org.jhotdraw.xml.DOMStorable
read, write
 

Method Detail

isEditable

boolean isEditable()
Returns true if the text of the TextHolderFigure can be edited.


getFont

java.awt.Font getFont()
Returns the font to be used by a text editor for editing this Figure.


getTextColor

java.awt.Color getTextColor()
Returns the text color to be used by a text editor for editing this Figure.


getFillColor

java.awt.Color getFillColor()
Returns the fill color to be used by a text editor for editing this Figure.


getLabelFor

TextHolderFigure getLabelFor()
Sometimes we want to use a TextHolderFigure as a label for another TextHolderFigure. Returns the TextHolderFigure that should be really used.


getTabSize

int getTabSize()
Gets the number of characters used to expand tabs.


getText

java.lang.String getText()
Returns the text held by the Text Holder.


setText

void setText(java.lang.String text)

getTextColumns

int getTextColumns()
Gets the number of columns to be overlaid when the figure is edited.


setFontSize

void setFontSize(float size)
Sets the font size of the text held by the TextHolderFigure.


getFontSize

float getFontSize()
Gets the font size of the text held by the TextHolderFigure.


getInsets

Insets2D.Double getInsets()
Returns Insets to be used by the text editor relative to the handle bounds of the figure.


isTextOverflow

boolean isTextOverflow()
Returns true, if the text does not fit into the bounds of the Figure.


Copyright 1996-2007 (c) JHotDraw.org.
Some rights reserved.