vocleditor.figures
Class SplitFigure

java.lang.Object
  extended by org.eclipse.draw2d.Figure
      extended by org.eclipse.draw2d.Shape
          extended by org.eclipse.draw2d.RectangleFigure
              extended by vocleditor.figures.SplitFigure
All Implemented Interfaces:
org.eclipse.draw2d.IFigure

public class SplitFigure
extends org.eclipse.draw2d.RectangleFigure

The graphical representation of a Boolean Expression. This resizable graphical representation of a VOCL boolExp contains ... TODO

Author:
bjoern

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
SplitFigure(boolean oppositeTextPos, org.eclipse.swt.graphics.Color fillColor, org.eclipse.swt.graphics.Color outsideColor)
          Constructs a new BoolExpFigure.
 
Method Summary
 void add(org.eclipse.draw2d.IFigure figure, java.lang.Object constraint, int index)
          Adds a figure.
 org.eclipse.draw2d.geometry.Dimension getMinimumSize(int wHint, int hHint)
          Returns the minimum size of this ConstraintFigure based on the size of the context, expression and condition figures.
 void setHorizontal(boolean horizontal)
          Sets the horizontal flag.
 void setMiddleLabel(java.lang.String text)
          Sest the middle label.
 void setMiddleTitle(java.lang.String text)
          Sets the middle title.
 void setSplitPercentage(int split)
          Sets the split percentage.
 void setTopLabel(java.lang.String text)
          Sets the top label.
 void setTopTitle(java.lang.String text)
          Sets the top title.
 void validate()
          redefined to set Expression figure size
 
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, 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

SplitFigure

public SplitFigure(boolean oppositeTextPos,
                   org.eclipse.swt.graphics.Color fillColor,
                   org.eclipse.swt.graphics.Color outsideColor)
Constructs a new BoolExpFigure.

Method Detail

setHorizontal

public void setHorizontal(boolean horizontal)
Sets the horizontal flag.

Parameters:
horizontal - the horizontal flag

setSplitPercentage

public void setSplitPercentage(int split)
Sets the split percentage.

Parameters:
split - the split percentage

setTopTitle

public void setTopTitle(java.lang.String text)
Sets the top title.

Parameters:
text - the title text

setMiddleTitle

public void setMiddleTitle(java.lang.String text)
Sets the middle title.

Parameters:
text - the title text

setTopLabel

public void setTopLabel(java.lang.String text)
Sets the top label.

Parameters:
text - the top label text

setMiddleLabel

public void setMiddleLabel(java.lang.String text)
Sest the middle label.

Parameters:
text - the moddle label text

add

public void add(org.eclipse.draw2d.IFigure figure,
                java.lang.Object constraint,
                int index)
Adds a figure.

Specified by:
add in interface org.eclipse.draw2d.IFigure
Overrides:
add in class org.eclipse.draw2d.Figure
See Also:
IFigure.add(org.eclipse.draw2d.IFigure, java.lang.Object, int)

validate

public void validate()
redefined to set Expression figure size

Specified by:
validate in interface org.eclipse.draw2d.IFigure
Overrides:
validate in class org.eclipse.draw2d.Figure
See Also:
IFigure.validate()

getMinimumSize

public org.eclipse.draw2d.geometry.Dimension getMinimumSize(int wHint,
                                                            int hHint)
Returns the minimum size of this ConstraintFigure based on the size of the context, expression and condition figures.

Specified by:
getMinimumSize in interface org.eclipse.draw2d.IFigure
Overrides:
getMinimumSize in class org.eclipse.draw2d.Figure
See Also:
IFigure.getMinimumSize(int, int)