|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tigris.gef.presentation.Fig
org.tigris.gef.presentation.FigGroup
public class FigGroup
A FigGroup is a collection of Figs to all be treated as a single item
Field Summary |
---|
Fields inherited from class org.tigris.gef.presentation.Fig |
---|
_allowsSaving, _context, _dashes, _dashPeriod, _dashStyle, _filled, _h, _w, _x, _y, an, annotationOwner, annotationStatus, BORDER, MIN_SIZE |
Constructor Summary | |
---|---|
FigGroup()
Construct a new FigGroup that holds no Figs. |
|
FigGroup(java.util.List figs)
Construct a new FigGroup that holds the given Figs. |
Method Summary | |
---|---|
void |
addFig(Fig fig)
Add a Fig to the group. |
void |
addFigs(java.util.Collection figs)
Add a collection of figs to the group. |
void |
calcBounds()
Accumulate a bounding box for all the Figs in the group. |
java.lang.Object |
clone()
|
boolean |
contains(int x,
int y)
Returns true if any Fig in the group contains the given point. |
Fig |
deepSelect(java.awt.Rectangle hitRect)
Let the group decide if it should be selected itself or the hitten grouped fig instead. |
java.util.Enumeration |
elements()
Deprecated. 0.11 use iterator() |
java.util.Collection |
getDisplayedFigs(java.util.Collection c)
Returns a list of the displayable Figs enclosed. |
int |
getExtraFrameSpace()
Returns the extra space that is added the frame surrounding the elements |
Fig |
getFigAt(int i)
Get the fig within this group with the given index position |
java.util.List |
getFigs()
Get the figs that make up this group |
java.awt.Font |
getFont()
|
java.lang.String |
getFontFamily()
|
int |
getFontSize()
|
java.lang.String |
getPrivateData()
TODO document Used in SVG.TEE |
java.awt.Dimension |
getSize()
Returns the size of the group containing all entries. |
protected java.awt.Rectangle |
getSubFigBounds(Fig subFig)
Returns the bounds of the given subfig. |
java.awt.Color |
getTextColor()
|
java.awt.Color |
getTextFillColor()
|
boolean |
getTextFilled()
|
boolean |
hit(java.awt.Rectangle r)
Returns true if any Fig in the group hits the given rect. |
Fig |
hitFig(java.awt.Rectangle r)
Retrieve the top-most Fig containing the given point, or null. |
boolean |
isReshapable()
Groups are resizable by default (see super class), but not reshapable, and not rotatable (for now). |
boolean |
isRotatable()
Groups are resizable by default (see super class), but not reshapable, and not rotatable (for now). |
java.util.Iterator |
iterator()
Reply an Iterator of the Figs contained in this FigGroup. |
void |
paint(java.awt.Graphics g)
Paint all the Figs in this group. |
void |
parseDynObjects(java.lang.String dynStr)
Empty method. |
void |
removeAll()
Delete all Fig's from the group. |
void |
removeFig(Fig f)
Remove a Fig from the group. |
void |
setBounds(int x,
int y,
int w,
int h)
Set the bounding box to the given rect. |
void |
setExtraFrameSpace(int extraSpace)
Sets the extra spacing for the frame around the elements |
void |
setFigs(java.util.Collection figs)
Sets a new collection of figs. |
void |
setFigs(java.util.List figs)
Set the Figs in this group. |
void |
setFillColor(java.awt.Color col)
Sets the color that will be used if the Fig is filled. |
void |
setFilled(boolean f)
Sets a flag to either fill the Fig with its fillColor or not. |
void |
setFont(java.awt.Font f)
|
void |
setFontFamily(java.lang.String s)
|
void |
setFontSize(int s)
|
void |
setLineColor(java.awt.Color col)
Sets the color to be used if the lineWidth is > 0. |
void |
setLineWidth(int w)
Set the line width. |
void |
setPrivateData(java.lang.String data)
Derived classes should implement this method |
void |
setTextColor(java.awt.Color c)
|
void |
setTextFillColor(java.awt.Color c)
|
void |
setTextFilled(boolean b)
|
void |
translate(int dx,
int dy)
Translate all the Fig in the list by the given offset. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FigGroup()
public FigGroup(java.util.List figs)
Method Detail |
---|
public void parseDynObjects(java.lang.String dynStr)
public void addFig(Fig fig)
fig
- the Fig to add to this grouppublic void addFigs(java.util.Collection figs)
figs
- Collection of figs to be added.public void setFigs(java.util.Collection figs)
figs
- Collection of figs to be set.public void calcBounds()
calcBounds
in class Fig
FigText.calcBounds()
protected java.awt.Rectangle getSubFigBounds(Fig subFig)
subFig
- Subfig of this group to calculate the bounds for.
public java.lang.Object clone()
clone
in class Fig
public boolean contains(int x, int y)
contains
in class Fig
FigCircle
,
FigEdge
public java.util.Enumeration elements()
public java.util.Iterator iterator()
public Fig getFigAt(int i)
i
- position of fig within this grouppublic java.util.List getFigs()
public java.awt.Font getFont()
public java.lang.String getFontFamily()
public int getFontSize()
public java.lang.String getPrivateData()
getPrivateData
in class Fig
public int getExtraFrameSpace()
public boolean hit(java.awt.Rectangle r)
hit
in class Fig
r
- the rectangular hit area
public Fig hitFig(java.awt.Rectangle r)
public boolean isReshapable()
isReshapable
in class Fig
public boolean isRotatable()
isRotatable
in class Fig
public void paint(java.awt.Graphics g)
paint
in class Fig
public void removeAll()
public void removeFig(Fig f)
public java.util.Collection getDisplayedFigs(java.util.Collection c)
public void setBounds(int x, int y, int w, int h)
setBounds
in class Fig
x
- new X co ordinate for figy
- new Y co ordinate for figw
- new width for figh
- new height for figpublic void setFigs(java.util.List figs)
public void setFillColor(java.awt.Color col)
Fig
setFillColor
in class Fig
public void setFilled(boolean f)
Fig
setFilled
in class Fig
public void setFont(java.awt.Font f)
public void setFontFamily(java.lang.String s)
public void setFontSize(int s)
public void setLineColor(java.awt.Color col)
Fig
setLineColor
in class Fig
public void setLineWidth(int w)
Fig
setLineWidth
in class Fig
w
- The new lineWidth valuepublic void setPrivateData(java.lang.String data)
Fig
setPrivateData
in class Fig
public void setTextColor(java.awt.Color c)
public void setTextFillColor(java.awt.Color c)
public void setTextFilled(boolean b)
public java.awt.Color getTextColor()
public java.awt.Color getTextFillColor()
public boolean getTextFilled()
public void setExtraFrameSpace(int extraSpace)
extraSpace
- Num of pixels added as additional spacingpublic void translate(int dx, int dy)
translate
in class Fig
public Fig deepSelect(java.awt.Rectangle hitRect)
hitRect
- Rectangle surrounding the current mouse position.
public java.awt.Dimension getSize()
getSize
in class Fig
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |