Class FormGroupStrategy
- java.lang.Object
-
- org.eclipse.nebula.widgets.pgroup.AbstractGroupStrategy
-
- org.eclipse.nebula.widgets.pgroup.FormGroupStrategy
-
public class FormGroupStrategy extends AbstractGroupStrategy
FormGroupStrategy makes a PGroup mimic the look and feel of an Eclipse Form Section.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description private int
betweenSpacing
private org.eclipse.swt.graphics.Color
borderColor
private int
fontHeight
private int
hMargin
private org.eclipse.swt.graphics.Color
initialBackColor
private org.eclipse.swt.graphics.Color
initialBorderColor
private int
margin
private int
textWidth
private int
titleHeight
private int
titleTextMargin
private org.eclipse.swt.graphics.Rectangle
toolItemArea
private int
vMargin
-
Constructor Summary
Constructors Constructor Description FormGroupStrategy()
Deprecated.use constructor with PGroup element insteadFormGroupStrategy(PGroup g)
Creates a FormGroupStrategy with the given toggle and style.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.swt.graphics.Rectangle
computeTrim(int x, int y, int width, int height)
void
dispose()
org.eclipse.swt.graphics.Color
getBorderColor()
org.eclipse.swt.graphics.Rectangle
getClientArea()
private org.eclipse.swt.graphics.Rectangle
getTextBounds()
org.eclipse.swt.graphics.Rectangle
getToolItemArea()
void
initialize()
boolean
isToggleLocation(int x, int y)
void
paint(org.eclipse.swt.graphics.GC gc)
Paints the actual group widget.void
setBorderColor(org.eclipse.swt.graphics.Color borderColor)
void
update()
-
Methods inherited from class org.eclipse.nebula.widgets.pgroup.AbstractGroupStrategy
getGroup
-
-
-
-
Field Detail
-
initialBackColor
private org.eclipse.swt.graphics.Color initialBackColor
-
initialBorderColor
private org.eclipse.swt.graphics.Color initialBorderColor
-
titleTextMargin
private int titleTextMargin
-
betweenSpacing
private int betweenSpacing
-
margin
private int margin
-
vMargin
private int vMargin
-
hMargin
private int hMargin
-
borderColor
private org.eclipse.swt.graphics.Color borderColor
-
titleHeight
private int titleHeight
-
textWidth
private int textWidth
-
fontHeight
private int fontHeight
-
toolItemArea
private org.eclipse.swt.graphics.Rectangle toolItemArea
-
-
Constructor Detail
-
FormGroupStrategy
public FormGroupStrategy()
Deprecated.use constructor with PGroup element instead
-
FormGroupStrategy
public FormGroupStrategy(PGroup g)
Creates a FormGroupStrategy with the given toggle and style.- Parameters:
toggle
-style
-
-
-
Method Detail
-
initialize
public void initialize()
- Overrides:
initialize
in classAbstractGroupStrategy
- See Also:
AbstractGroupStrategy.initialize()
-
paint
public void paint(org.eclipse.swt.graphics.GC gc)
Description copied from class:AbstractGroupStrategy
Paints the actual group widget. This method is to be implemented by extending classes.- Specified by:
paint
in classAbstractGroupStrategy
- See Also:
AbstractGroupStrategy.paint(org.eclipse.swt.graphics.GC)
-
getToolItemArea
public org.eclipse.swt.graphics.Rectangle getToolItemArea()
- Overrides:
getToolItemArea
in classAbstractGroupStrategy
- Returns:
- the area where toolitems can be drawn
-
isToggleLocation
public boolean isToggleLocation(int x, int y)
- Overrides:
isToggleLocation
in classAbstractGroupStrategy
- Returns:
- See Also:
AbstractGroupStrategy.isToggleLocation(int, int)
-
getTextBounds
private org.eclipse.swt.graphics.Rectangle getTextBounds()
-
getClientArea
public org.eclipse.swt.graphics.Rectangle getClientArea()
- Specified by:
getClientArea
in classAbstractGroupStrategy
- See Also:
AbstractGroupStrategy.getClientArea()
-
computeTrim
public org.eclipse.swt.graphics.Rectangle computeTrim(int x, int y, int width, int height)
- Specified by:
computeTrim
in classAbstractGroupStrategy
-
dispose
public void dispose()
- Specified by:
dispose
in classAbstractGroupStrategy
- See Also:
AbstractGroupStrategy.dispose()
-
getBorderColor
public org.eclipse.swt.graphics.Color getBorderColor()
- Returns:
- Returns the borderColor.
-
setBorderColor
public void setBorderColor(org.eclipse.swt.graphics.Color borderColor)
- Parameters:
borderColor
- The borderColor to set.
-
update
public void update()
- Specified by:
update
in classAbstractGroupStrategy
-
-