|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.placelab.util.swt.Glyph
| Field Summary | |
static int |
ANCHOR_C
|
static int |
ANCHOR_E
|
static int |
ANCHOR_N
|
static int |
ANCHOR_NE
|
static int |
ANCHOR_NW
|
static int |
ANCHOR_S
|
static int |
ANCHOR_SE
|
static int |
ANCHOR_SW
|
static int |
ANCHOR_W
|
static int |
DISPOSED
|
static int |
IGNORE_TRANSPARENCY
|
static int |
MOUSE_EVENTS
|
protected boolean |
needsTransformRedraw
|
static int |
NONE
|
protected AffineTransform |
transform
|
protected org.eclipse.swt.graphics.Image |
transformedImage
|
protected int |
transparency
|
static int |
VISIBLE
|
protected double |
zoom
|
| Constructor Summary | |
Glyph(GlyphComposite parent,
int style)
|
|
Glyph(GlyphHolder holder,
int style)
|
|
| Method Summary | |
void |
addListener(int eventType,
org.eclipse.swt.widgets.Listener handler)
|
void |
addMouseListener(org.eclipse.swt.events.MouseListener listener)
|
void |
addPaintListener(org.eclipse.swt.events.PaintListener listener)
|
boolean |
areMouseEventsEnabled()
|
void |
dispose()
|
void |
enableMouseEvents(boolean enable)
|
protected void |
enter(org.eclipse.swt.events.MouseEvent e)
|
org.eclipse.swt.graphics.Rectangle |
getBounds()
|
protected abstract org.eclipse.swt.graphics.Rectangle |
getBoundsImpl()
|
int |
getCloseEnough()
|
boolean |
getFlag(int flag)
|
GlyphHolder |
getHolder()
|
org.eclipse.swt.graphics.Point |
getLocation()
Gets the location that the Glyph is currently at, translated to account for zoom |
protected org.eclipse.swt.graphics.Color |
getMaskColor()
Because swt cannot draw into an image and leave the pixels in the image not drawn on in a transparent state and make the other pixels opaque, Glyphs must set a mask color which stands for transparent. |
protected boolean |
getNeedsTransformRedraw()
Return true here if your glyph needs to have its transform image recalculated That is, if its changed anywhere that will matter, return true. |
org.eclipse.swt.graphics.Point |
getOriginalLocation()
Gets the location that the Glyph is set to for a zoom of 1.0 |
GlyphComposite |
getParent()
|
AffineTransform |
getTransform()
|
int |
getTransparency()
|
double |
getZoom()
|
void |
handleMouseEvent(int eventType,
org.eclipse.swt.events.MouseEvent e)
|
boolean |
isDisposed()
|
boolean |
isVisible()
|
protected void |
leave(org.eclipse.swt.events.MouseEvent e)
|
void |
moveAbove(Glyph glyph)
|
void |
moveBelow(Glyph glyph)
|
void |
notifyListeners(int eventType,
org.eclipse.swt.widgets.Event event)
|
void |
paint(org.eclipse.swt.events.PaintEvent e,
GlyphGC gc)
If you want to do your own drawing for the AffineTransform (for instance, your glyph is a vector graphic thats easily drawn transformed, override this and handle for the transform yourself). |
protected void |
paintImpl(org.eclipse.swt.events.PaintEvent e,
GlyphGC gc)
Implement this if you don't want to worry about AffineTransforms. |
Glyph |
pickGlyphAt(int x,
int y,
boolean checkMouseEnabled)
|
boolean |
pointInside(int x,
int y)
|
boolean |
pointInside(org.eclipse.swt.graphics.Point p)
|
protected abstract boolean |
pointInsideImpl(int x,
int y)
Return if the point is inside your glyph without the AffineTransform applied |
void |
redraw(org.eclipse.swt.graphics.Rectangle invalidate)
|
void |
removeListener(int eventType,
org.eclipse.swt.widgets.Listener handler)
|
void |
resetFlag(int flag)
|
void |
setCloseEnough(int c)
|
void |
setCursor(org.eclipse.swt.graphics.Cursor cursor)
|
void |
setFlag(int flag)
|
void |
setLocation(org.eclipse.swt.graphics.Point loc)
|
protected void |
setNeedsTransformRedraw(boolean flag)
|
void |
setTransform(AffineTransform aTransform)
|
void |
setTransparency(int newTransparency)
|
void |
setVisible(boolean visible)
|
void |
setZoom(double z)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int ANCHOR_NW
public static final int ANCHOR_N
public static final int ANCHOR_NE
public static final int ANCHOR_E
public static final int ANCHOR_SE
public static final int ANCHOR_S
public static final int ANCHOR_SW
public static final int ANCHOR_W
public static final int ANCHOR_C
public static final int NONE
public static final int DISPOSED
public static final int VISIBLE
public static final int MOUSE_EVENTS
public static final int IGNORE_TRANSPARENCY
protected AffineTransform transform
protected boolean needsTransformRedraw
protected org.eclipse.swt.graphics.Image transformedImage
protected int transparency
protected double zoom
| Constructor Detail |
public Glyph(GlyphComposite parent,
int style)
public Glyph(GlyphHolder holder,
int style)
| Method Detail |
public void setFlag(int flag)
public void resetFlag(int flag)
public boolean getFlag(int flag)
public boolean isDisposed()
public GlyphHolder getHolder()
public GlyphComposite getParent()
public void setCloseEnough(int c)
public int getCloseEnough()
public void setTransparency(int newTransparency)
public int getTransparency()
public void setTransform(AffineTransform aTransform)
public AffineTransform getTransform()
public void setZoom(double z)
public double getZoom()
public void setLocation(org.eclipse.swt.graphics.Point loc)
public org.eclipse.swt.graphics.Point getOriginalLocation()
public org.eclipse.swt.graphics.Point getLocation()
public void dispose()
public void addListener(int eventType,
org.eclipse.swt.widgets.Listener handler)
public void removeListener(int eventType,
org.eclipse.swt.widgets.Listener handler)
public void notifyListeners(int eventType,
org.eclipse.swt.widgets.Event event)
public void addPaintListener(org.eclipse.swt.events.PaintListener listener)
public void addMouseListener(org.eclipse.swt.events.MouseListener listener)
public void paint(org.eclipse.swt.events.PaintEvent e,
GlyphGC gc)
protected void paintImpl(org.eclipse.swt.events.PaintEvent e,
GlyphGC gc)
protected org.eclipse.swt.graphics.Color getMaskColor()
protected boolean getNeedsTransformRedraw()
protected void setNeedsTransformRedraw(boolean flag)
public void handleMouseEvent(int eventType,
org.eclipse.swt.events.MouseEvent e)
public Glyph pickGlyphAt(int x,
int y,
boolean checkMouseEnabled)
public void redraw(org.eclipse.swt.graphics.Rectangle invalidate)
public void setVisible(boolean visible)
public boolean isVisible()
public void enableMouseEvents(boolean enable)
public boolean areMouseEventsEnabled()
public org.eclipse.swt.graphics.Rectangle getBounds()
public boolean pointInside(int x,
int y)
protected abstract org.eclipse.swt.graphics.Rectangle getBoundsImpl()
protected abstract boolean pointInsideImpl(int x,
int y)
public boolean pointInside(org.eclipse.swt.graphics.Point p)
public void moveAbove(Glyph glyph)
public void moveBelow(Glyph glyph)
public void setCursor(org.eclipse.swt.graphics.Cursor cursor)
protected void enter(org.eclipse.swt.events.MouseEvent e)
protected void leave(org.eclipse.swt.events.MouseEvent e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||