|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.draw2d.Figure
org.eclipse.draw2d.Shape
org.eclipse.draw2d.RectangleFigure
vocleditor.figures.IfExpFigure
public class IfExpFigure
The graphical representation of an if expression. It consist of an if part and a then-else part (which is a SplitFigure). The figure can be split horizontally or vertically and the percentage of space used by the if-part can be set.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure |
---|
org.eclipse.draw2d.Figure.FigureIterator |
Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure |
---|
org.eclipse.draw2d.IFigure.NoInsets |
Field Summary |
---|
Fields inherited from interface org.eclipse.draw2d.IFigure |
---|
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS |
Constructor Summary | |
---|---|
IfExpFigure(org.eclipse.swt.graphics.Color fillColor,
org.eclipse.swt.graphics.Color outsideColor)
Constructs a new IfExpFigure |
Method Summary | |
---|---|
void |
add(org.eclipse.draw2d.IFigure figure,
java.lang.Object constraint,
int index)
Redefined to add NavExp figures to the if-part or to the then-else part of this figure. |
org.eclipse.draw2d.geometry.Dimension |
getMinimumSize(int wHint,
int hHint)
Returns the minimum size of this Figure based on the size of the if part and the then-else part. |
org.eclipse.draw2d.geometry.Dimension |
getPreferredSize(int wHint,
int hHint)
returns the preferred size of this figure |
void |
setHorizontal(boolean horizontal)
Sets whether this figure should be split horizontally or not. |
void |
setSplitPercentage1(int split)
Sets the percentage of space used by the if-part. |
void |
setSplitPercentage2(int split)
Sets the percentage of space used by the then-part of the then-else part. |
void |
validate()
redefined to set size if the parts based on whether this figure is split horizontally or not |
Methods inherited from class org.eclipse.draw2d.Shape |
---|
getLineStyle, getLineWidth, isOpaque, paintFigure, setFill, setFillXOR, setLineStyle, setLineWidth, setOutline, setOutlineXOR, setXOR |
Methods inherited from class org.eclipse.draw2d.Figure |
---|
add, add, add, addAncestorListener, addFigureListener, addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getCursor, getFont, getForegroundColor, getInsets, getLayoutManager, getLocalBackgroundColor, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getParent, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isEnabled, isFocusTraversable, isRequestFocusEnabled, isShowing, isVisible, paint, remove, removeAll, removeAncestorListener, removeFigureListener, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setConstraint, setCursor, setEnabled, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IfExpFigure(org.eclipse.swt.graphics.Color fillColor, org.eclipse.swt.graphics.Color outsideColor)
fillColor
- the background color to be used within the figureoutsideColor
- the color to be used for the appearing like outside the figureMethod Detail |
---|
public void setHorizontal(boolean horizontal)
horizontal
- if true the if part is left of the then-else part, otherwise the if part is above the then-else partpublic void setSplitPercentage1(int split)
split
- percentage of space used by the if-partpublic void setSplitPercentage2(int split)
split
- percentage of space used by the then-partpublic void add(org.eclipse.draw2d.IFigure figure, java.lang.Object constraint, int index)
add
in interface org.eclipse.draw2d.IFigure
add
in class org.eclipse.draw2d.Figure
IFigure.add(org.eclipse.draw2d.IFigure, java.lang.Object, int)
public void validate()
validate
in interface org.eclipse.draw2d.IFigure
validate
in class org.eclipse.draw2d.Figure
IFigure.validate()
public org.eclipse.draw2d.geometry.Dimension getMinimumSize(int wHint, int hHint)
getMinimumSize
in interface org.eclipse.draw2d.IFigure
getMinimumSize
in class org.eclipse.draw2d.Figure
IFigure.getMinimumSize(int, int)
public org.eclipse.draw2d.geometry.Dimension getPreferredSize(int wHint, int hHint)
getPreferredSize
in interface org.eclipse.draw2d.IFigure
getPreferredSize
in class org.eclipse.draw2d.Figure
IFigure.getPreferredSize(int, int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |