|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mailster.gui.pshelf.AbstractRenderer
public abstract class AbstractRenderer
NOTE: THIS WIDGET AND ITS API ARE STILL UNDER DEVELOPMENT. THIS IS A PRE-RELEASE ALPHA VERSION. USERS SHOULD EXPECT API CHANGES IN FUTURE VERSIONS.
Renders a single visual unit.
| Field Summary | |
|---|---|
private org.eclipse.swt.graphics.Rectangle |
bounds
The bounds the renderer paints on. |
private boolean |
disposed
|
private boolean |
expanded
Expansion state. |
private boolean |
focus
Renderer has focus. |
private boolean |
hover
Hover state. |
private boolean |
mouseDown
Mouse down on the renderer area. |
private boolean |
selected
Selection state. |
| Constructor Summary | |
|---|---|
AbstractRenderer()
|
|
| Method Summary | |
|---|---|
abstract org.eclipse.swt.graphics.Point |
computeSize(org.eclipse.swt.graphics.GC gc,
int wHint,
int hHint,
java.lang.Object value)
Returns the size of the given value's visual representation. |
void |
dispose()
Disposes of any resources managed by this renderer. |
org.eclipse.swt.graphics.Rectangle |
getBounds()
Returns the bounds. |
org.eclipse.swt.graphics.Point |
getSize()
Returns the size. |
abstract void |
initialize(org.eclipse.swt.widgets.Control parent)
Performs any initialization logic (such as creating new colors or fonts). |
boolean |
isDisposed()
|
boolean |
isExpanded()
Returns the expansion state. |
boolean |
isFocus()
Returns a boolean value indicating if this renderer has focus. |
boolean |
isHover()
Returns the hover state. |
boolean |
isMouseDown()
Returns the boolean value indicating if the renderer has the mouseDown state. |
boolean |
isSelected()
Returns the boolean state indicating if the selected state is set. |
abstract void |
paint(org.eclipse.swt.graphics.GC gc,
java.lang.Object value)
Paints the visual representation of the given value on the given GC. |
void |
setBounds(int x,
int y,
int width,
int height)
Sets the bounds of the drawing. |
void |
setBounds(org.eclipse.swt.graphics.Rectangle bounds)
Sets the bounds of the drawing. |
protected void |
setDisposed(boolean disposed)
|
void |
setExpanded(boolean expanded)
Sets the expansion state of this renderer. |
void |
setFocus(boolean focus)
Sets focus state. |
void |
setHover(boolean hover)
Sets the hover state. |
void |
setLocation(int x,
int y)
Sets the location of the drawing. |
void |
setLocation(org.eclipse.swt.graphics.Point location)
Sets the location of the drawing. |
void |
setMouseDown(boolean mouseDown)
Sets the mouse down state. |
void |
setSelected(boolean selected)
Sets the selected state. |
void |
setSize(int width,
int height)
Sets the area of the drawing. |
void |
setSize(org.eclipse.swt.graphics.Point size)
Sets the area of the drawing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private boolean hover
private boolean focus
private boolean mouseDown
private boolean selected
private boolean expanded
private org.eclipse.swt.graphics.Rectangle bounds
private boolean disposed
| Constructor Detail |
|---|
public AbstractRenderer()
| Method Detail |
|---|
public org.eclipse.swt.graphics.Rectangle getBounds()
public void setBounds(int x,
int y,
int width,
int height)
x - X coordinate.y - Y coordinate.width - Width.height - Height.public void setBounds(org.eclipse.swt.graphics.Rectangle bounds)
bounds - Bounds.public org.eclipse.swt.graphics.Point getSize()
public void setLocation(int x,
int y)
x - X.y - Y.public void setLocation(org.eclipse.swt.graphics.Point location)
location - Location.
public void setSize(int width,
int height)
width - Width.height - Height.public void setSize(org.eclipse.swt.graphics.Point size)
size - Size.public boolean isFocus()
public void setFocus(boolean focus)
focus - focus state.public boolean isHover()
public void setHover(boolean hover)
hover - Hover state.public boolean isMouseDown()
public void setMouseDown(boolean mouseDown)
mouseDown - Mouse state.public boolean isSelected()
public void setSelected(boolean selected)
selected - Selection state.public boolean isExpanded()
public void setExpanded(boolean expanded)
expanded - The expanded to set.
public abstract void paint(org.eclipse.swt.graphics.GC gc,
java.lang.Object value)
Implementors need to respect the bounds values that may have been
specified. The bounds values may affect the x and y values for all
drawing operations as well as the width and heights. Implementors may use
a Transform to translate the coordinates of all the
drawing operations, otherwise they will need to offset each draw.
gc - GC to paint withvalue - the value being painted
public abstract org.eclipse.swt.graphics.Point computeSize(org.eclipse.swt.graphics.GC gc,
int wHint,
int hHint,
java.lang.Object value)
gc - convenience GC for string and text extentswHint - given width (or SWT.DEFAULT)hHint - given height (or SWT.DEFAULT)value - value to be sized
public abstract void initialize(org.eclipse.swt.widgets.Control parent)
parent - control that is using the rendererpublic void dispose()
public boolean isDisposed()
protected void setDisposed(boolean disposed)
disposed - the disposed to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||