Class TextBox
- java.lang.Object
-
- com.cosylab.vdct.graphics.objects.VisibleObject
-
- com.cosylab.vdct.graphics.objects.TextBox
-
- All Implemented Interfaces:
BorderObject
,Clipboardable
,Descriptable
,Flexible
,Movable
,Selectable
,Visitable
,Popupable
public class TextBox extends VisibleObject implements BorderObject, Movable, Selectable, Popupable, Descriptable, Flexible, Clipboardable
- Author:
- ssah, msekoran To change this generated comment edit the template variable "typecomment": Window>Preferences>Java>Templates.
-
-
Field Summary
Fields Modifier and Type Field Description protected AttributedString
attText
protected int[]
breaks
protected String
description
protected double
fontScale
protected FontRenderContext
frc
protected boolean
htmlMode
protected JLabel
label
protected LineBreakMeasurer
lineMeasurer
protected Hashtable
map
protected AttributedCharacterIterator
paragraph
protected int
paragraphEnd
protected int
paragraphStart
protected Font
rfont
-
Fields inherited from class com.cosylab.vdct.graphics.objects.VisibleObject
x, y, zoomImage
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Visitor visitor)
boolean
checkMove(int dx, int dy)
Insert the method's description here.Flexible
copyToGroup(Object dsId, String group)
Returns the copied instance or null if the object cannot be copied.void
destroy()
Insert the method's description here.protected void
draw(Graphics g, boolean hilited)
Insert the method's description here.void
drawDashedBorder(Graphics g, boolean hilited)
protected void
drawMultiLineText(Graphics g, float drawPosX, float drawPosY, float formatWidth)
static boolean
getCurrentBorder()
String
getDescription()
Insert the method's description here.Vertex
getEndVertex()
String
getFlexibleName()
Insert the method's description here.String
getHashID()
Insert the method's description here.Vector
getItems()
Insert the method's description here.String
getName()
Vertex
getStartVertex()
int
getX()
Insert the method's description here.int
getY()
Insert the method's description here.VisibleObject
hiliteComponentsCheck(int x, int y)
Returned value inicates change Creation date: (21.12.2000 22:21:12)VisibleObject
intersects(int px, int py)
Default impmlementation for square (must be rescaled) Creation date: (19.12.2000 20:20:20)boolean
isBorder()
Returns the border.boolean
move(int dx, int dy)
Insert the method's description here.boolean
moveToGroup(Object dsId, String group)
Insert the method's description here.boolean
rename(Object dsId, String newName)
Insert the method's description here.void
revalidatePosition()
Insert the method's description here.void
setBorder(boolean parBorder)
void
setColor(Color color)
Insert the method's description here.void
setDescription(String description)
Insert the method's description here.void
setFont(Font parFont)
Insert the method's description here.void
showChangeTextDialog()
void
snapToGrid()
Snap to grid.protected void
validate()
Insert the method's description here.-
Methods inherited from class com.cosylab.vdct.graphics.objects.VisibleObject
forceValidation, getColor, getDsId, getFont, getHeight, getLabel, getLeftOffset, getMarkedX, getMarkedY, getMoveInsideView, getParent, getRheight, getRightOffset, getRlabelX, getRlabelY, getRootContainer, getRscale, getRwidth, getRx, getRy, getScale, getTopOffset, getVisibleColor, getWidth, intersects, isDestroyed, isVisible, isZoomRepaint, markPosition, paint, postDraw, postPaint, setDestroyed, setHeight, setLabel, setParent, setRheight, setRlabelX, setRlabelY, setRwidth, setRx, setRy, setScale, setWidth, setX, setY, setZoomRepaint, unconditionalValidation
-
-
-
-
Field Detail
-
description
protected String description
-
label
protected JLabel label
-
htmlMode
protected boolean htmlMode
-
map
protected Hashtable map
-
attText
protected AttributedString attText
-
paragraph
protected AttributedCharacterIterator paragraph
-
paragraphStart
protected int paragraphStart
-
paragraphEnd
protected int paragraphEnd
-
lineMeasurer
protected LineBreakMeasurer lineMeasurer
-
breaks
protected int[] breaks
-
frc
protected FontRenderContext frc
-
fontScale
protected double fontScale
-
rfont
protected Font rfont
-
-
Method Detail
-
showChangeTextDialog
public void showChangeTextDialog()
-
drawMultiLineText
protected void drawMultiLineText(Graphics g, float drawPosX, float drawPosY, float formatWidth)
- Parameters:
g
- gdrawPosX
- drawPosXdrawPosY
- drawPosYformatWidth
- formatWidth
-
setColor
public void setColor(Color color)
Description copied from class:VisibleObject
Insert the method's description here. Creation date: (19.12.2000 20:10:52)- Overrides:
setColor
in classVisibleObject
- Parameters:
color
- java.awt.Color
-
setFont
public void setFont(Font parFont)
Description copied from class:VisibleObject
Insert the method's description here. Creation date: (19.12.2000 20:10:52)- Overrides:
setFont
in classVisibleObject
- Parameters:
parFont
- java.awt.Font
-
accept
public void accept(Visitor visitor)
-
checkMove
public boolean checkMove(int dx, int dy)
Description copied from interface:Movable
Insert the method's description here. Creation date: (27.12.2000 13:08:09)
-
copyToGroup
public Flexible copyToGroup(Object dsId, String group)
Description copied from interface:Flexible
Returns the copied instance or null if the object cannot be copied. Creation date: (4.2.2001 21:59:44)- Specified by:
copyToGroup
in interfaceFlexible
- Parameters:
dsId
- dsIdgroup
- java.lang.String- Returns:
- something
-
destroy
public void destroy()
Description copied from class:VisibleObject
Insert the method's description here. Creation date: (30.1.2001 11:58:53)- Overrides:
destroy
in classVisibleObject
-
draw
protected void draw(Graphics g, boolean hilited)
Description copied from class:VisibleObject
Insert the method's description here. Creation date: (19.12.2000 21:30:46)- Specified by:
draw
in classVisibleObject
- Parameters:
g
- java.awt.Graphicshilited
- boolean
-
drawDashedBorder
public void drawDashedBorder(Graphics g, boolean hilited)
- Parameters:
g
- ghilited
- hilited
-
getCurrentBorder
public static boolean getCurrentBorder()
- Returns:
- something
-
getEndVertex
public Vertex getEndVertex()
- Returns:
- something
-
getFlexibleName
public String getFlexibleName()
Description copied from interface:Flexible
Insert the method's description here. Creation date: (3.5.2001 10:15:48)- Specified by:
getFlexibleName
in interfaceFlexible
- Returns:
- java.lang.String
-
getHashID
public String getHashID()
Description copied from class:VisibleObject
Insert the method's description here. Creation date: (3.5.2001 16:40:00)- Specified by:
getHashID
in classVisibleObject
- Returns:
- java.lang.String
-
getItems
public Vector getItems()
Description copied from interface:Popupable
Insert the method's description here. Creation date: (2.2.2001 20:26:25)
-
getName
public String getName()
- Specified by:
getName
in interfaceBorderObject
- Returns:
- something
-
getStartVertex
public Vertex getStartVertex()
- Returns:
- something
-
move
public boolean move(int dx, int dy)
Description copied from interface:Movable
Insert the method's description here. Creation date: (25.12.2000 14:13:14)
-
moveToGroup
public boolean moveToGroup(Object dsId, String group)
Description copied from interface:Flexible
Insert the method's description here. Creation date: (4.2.2001 22:00:01)- Specified by:
moveToGroup
in interfaceFlexible
- Parameters:
dsId
- dsIdgroup
- java.lang.String- Returns:
- something
-
rename
public boolean rename(Object dsId, String newName)
Description copied from interface:Flexible
Insert the method's description here. Creation date: (2.5.2001 23:23:17)
-
revalidatePosition
public void revalidatePosition()
Description copied from class:VisibleObject
Insert the method's description here. Creation date: (21.12.2000 21:21:59)- Specified by:
revalidatePosition
in classVisibleObject
-
setBorder
public void setBorder(boolean parBorder)
- Parameters:
parBorder
- parBorder
-
validate
protected void validate()
Description copied from class:VisibleObject
Insert the method's description here. Creation date: (19.12.2000 21:31:15)- Specified by:
validate
in classVisibleObject
-
getDescription
public String getDescription()
Description copied from interface:Descriptable
Insert the method's description here. Creation date: (9.4.2001 13:11:19)- Specified by:
getDescription
in interfaceDescriptable
- Returns:
- java.lang.String
- See Also:
Descriptable.getDescription()
-
setDescription
public void setDescription(String description)
Description copied from interface:Descriptable
Insert the method's description here. Creation date: (24.4.2001 17:39:35)- Specified by:
setDescription
in interfaceDescriptable
- Parameters:
description
- java.lang.String- See Also:
Descriptable.setDescription(String)
-
hiliteComponentsCheck
public VisibleObject hiliteComponentsCheck(int x, int y)
Returned value inicates change Creation date: (21.12.2000 22:21:12)- Parameters:
x
- inty
- int- Returns:
- com.cosylab.visible.objects.VisibleObject
-
intersects
public VisibleObject intersects(int px, int py)
Default impmlementation for square (must be rescaled) Creation date: (19.12.2000 20:20:20)- Overrides:
intersects
in classVisibleObject
- Parameters:
px
- intpy
- int- Returns:
- com.cosylab.visible.objects.VisibleObject
-
isBorder
public boolean isBorder()
Returns the border.- Returns:
- boolean
-
getX
public int getX()
Description copied from class:VisibleObject
Insert the method's description here. Creation date: (19.12.2000 20:10:52)- Overrides:
getX
in classVisibleObject
- Returns:
- int
-
getY
public int getY()
Description copied from class:VisibleObject
Insert the method's description here. Creation date: (19.12.2000 20:10:52)- Overrides:
getY
in classVisibleObject
- Returns:
- int
-
snapToGrid
public void snapToGrid()
Description copied from class:VisibleObject
Snap to grid. Nearest point is taken.- Overrides:
snapToGrid
in classVisibleObject
-
-