Class sgraphics.figure.FigureViewer
All Packages Class Hierarchy This Package Previous Next Index
Class sgraphics.figure.FigureViewer
java.lang.Object
|
+----sgraphics.GlyphImpl
|
+----sgraphics.MonoGlyph
|
+----sgraphics.ViewerImpl
|
+----sgraphics.figure.FigureViewer
- public class FigureViewer
- extends ViewerImpl
Make any glyph or figure usable on a canvas. This will take care
of scaling and scrolling. The child glyph or figure must be able
to change its size via the allocation(Allocation) call in order for
scaling to work.
Note: FigureViewer wont work if double buffering is turned off in SgraphicsAdapter.
-
FigureViewer(Glyph, Point)
-
-
allocate(Allocation)
-
-
draw(Painter)
-
-
getMode()
-
-
getStyle()
-
-
mouseDown(GraphicsEvent, float, float)
- Called when the mouse is pressed.
-
mouseDrag(GraphicsEvent, float, float)
- Called when the mouse is dragged (the mouse button is down).
-
mouseUp(GraphicsEvent, float, float)
- Called when the mouse is released.
-
pick(Picker)
- Checks for hits.
-
requirements()
- Ask for the glyph's geometry requirements.
-
setMode(int)
-
-
setStyle(FigureStyle)
-
FigureViewer
public FigureViewer(Glyph glyph,
Point p)
- Parameters:
- glyph - the adapted glyph.
- p - the point where the upper left corner of the figure will be placed.
mouseDrag
public boolean mouseDrag(GraphicsEvent event,
float X,
float Y)
- Called when the mouse is dragged (the mouse button is down).
- Overrides:
- mouseDrag in class ViewerImpl
mouseDown
public boolean mouseDown(GraphicsEvent event,
float X,
float Y)
- Called when the mouse is pressed.
- Overrides:
- mouseDown in class ViewerImpl
mouseUp
public boolean mouseUp(GraphicsEvent event,
float X,
float Y)
- Called when the mouse is released.
- Overrides:
- mouseUp in class ViewerImpl
requirements
public Requirements requirements()
- Ask for the glyph's geometry requirements.
- Overrides:
- requirements in class MonoGlyph
allocate
public void allocate(Allocation allocation)
- Overrides:
- allocate in class MonoGlyph
pick
public void pick(Picker pick)
- Checks for hits.
- Overrides:
- pick in class ViewerImpl
draw
public void draw(Painter painter)
- Overrides:
- draw in class MonoGlyph
setStyle
public void setStyle(FigureStyle style)
getStyle
public FigureStyle getStyle()
setMode
public void setMode(int mode)
getMode
public int getMode()
All Packages Class Hierarchy This Package Previous Next Index