|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--gishur.gui2.DisplayManager
The drawing surface for DrawManagers
.
Inner classes inherited from class java.awt.Canvas |
java.awt.Canvas.AccessibleAWTCanvas |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
static byte |
PAINT_ALL
Repaint all objects |
static byte |
PAINT_DIRTY
Repaint all dirty objects |
static byte |
PAINT_NOTHING
Just draw the buffered image |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
DisplayManager(java.lang.String name,
DrawManager manager)
Constructs a new DisplayManager with the specified DrawManager . |
Method Summary | |
void |
addGeneralAWTEventListener(GeneralAWTEventListener listener)
Adds the specified GeneralAWTEventListener to receive all
AWTEvents from this DisplayManager. |
void |
addModifyListener(ModifyListener listener)
Adds the specified ModifyListener to receive ModifyEvent s
from this DisplayManager. |
boolean |
containsGeneralAWTEventListener(GeneralAWTEventListener listener)
Checks, if the given event listener is already connected to this component. |
boolean |
containsModifyListener(ModifyListener listener)
Checks, if the given event listener is already connected to this component. |
int |
getPaintInterval()
Returns the repaint interval. |
RenderContext |
getRenderContext()
Returns the RenderContext used. |
java.lang.String |
getStatusTip(int x,
int y)
Returns the StatusTip-text. |
java.lang.String |
getToolTip(int x,
int y)
Returns the ToolTip-text for this component. |
java.awt.Rectangle |
getViewPort()
Returns the view port size. |
boolean |
hasStatusTips()
Returns true if StatusTips are enabled. |
boolean |
hasToolTips()
Returns true if ToolTips are enabled. |
void |
invalidate()
Invalidates this component. |
boolean |
isValid()
Determines whether this component is valid. |
java.awt.Point |
lastMousePosition()
Returns the last mouse position. |
DrawManager |
manager()
Returns the DrawManager for this DisplayManager. |
void |
paint(java.awt.Graphics g)
Paints this component. |
protected void |
processEvent(java.awt.AWTEvent e)
Processes events occurring on this component. |
protected void |
processModifyEvent(ModifyEvent e)
Processes ModifyEvents occured at this DisplayManager. |
void |
removeCursor(DrawAtom owner)
Removes the mouse cursor set by the given owner. |
void |
removeGeneralAWTEventListener(GeneralAWTEventListener listener)
Removes the specified GeneralAWTEventListener so that it no
longer receives all AWTEvents from this
DisplayManager. |
void |
removeModifyListener(ModifyListener listener)
Removes the specified ModifyListener so that it no longer
receives ModifyEvent s from this DisplayManager. |
void |
repaint()
Requests the DisplayManager to repaint its objects. |
void |
repaint(byte mode)
Requests the DisplayManager to repaint its objects with the specified repaint mode. |
void |
run()
The run-method for the repaint-thread. |
void |
setCursor(java.awt.Cursor cursor,
DrawAtom owner)
Sets the mouse cursor to the given cursor. |
void |
setPaintInterval(int time)
Sets the repaint interval for this DisplayManager. |
void |
setPaintPriority(int priority)
Sets the priority of the thread that repaints the elements. |
void |
setRenderContext(RenderContext context)
Sets the RenderContext to use. |
boolean |
setStatusTips(boolean tip)
Enables / disables ToolTips |
boolean |
setToolTips(boolean tip)
Enables / disables ToolTips |
void |
update(byte mode)
Updates the screen dirtectly with the specified repaint mode. |
void |
update(java.awt.Graphics g)
Updates this component. |
Methods inherited from class java.awt.Canvas |
addNotify, getAccessibleContext |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final byte PAINT_NOTHING
public static final byte PAINT_DIRTY
public static final byte PAINT_ALL
Constructor Detail |
public DisplayManager(java.lang.String name, DrawManager manager)
DrawManager
.name
- the name of the DisplayManagermanager
- DrawManager
to useMethod Detail |
public DrawManager manager()
public void setPaintInterval(int time)
time
specifies the duration of a
paint interval. The value 0 means paint on demand (objects are
repainted as soon as they have changed). The repaint with a non
negative paint interval works via an extra paint thread.
The value -1 means paint on demand via the java awt paint thread.
A negative value less than -1 means repaint by the user
(through update(byte)
).time
- repaint interval in millisecondspublic void setRenderContext(RenderContext context)
RenderContext
to use.context
- the new RenderContext
to use.public RenderContext getRenderContext()
RenderContext
used.RenderContext
used.public int getPaintInterval()
public void setPaintPriority(int priority)
Thread.MIN_PRIORITY
to Thread.MAX_PRIORITY
. The setting takes only
affect until a call to setPaintInterval(int)
and if the
paint interval was set to a value at least 0
.priority
- the new priority for the repaint threadpublic java.awt.Rectangle getViewPort()
public void run()
run
in interface java.lang.Runnable
public void repaint()
repaint
in class java.awt.Component
public void repaint(byte mode)
mode
- repaint mode (a constant of {PAINT_NOTHING
,
PAINT_DIRTY
,PAINT_ALL
})public void update(byte mode)
setPaintInterval(int)
). This method can
be used for own repaint modes.mode
- repaint mode (on constant of {PAINT_NOTHING
,
PAINT_DIRTY
,PAINT_ALL
})public void update(java.awt.Graphics g)
Component.repaint()
.update
in class java.awt.Component
g
- the specified context to use for updating.public void paint(java.awt.Graphics g)
paint
in class java.awt.Canvas
g
- The graphics context to use for painting.public void invalidate()
invalidate
in class java.awt.Component
public boolean isValid()
isValid
in class java.awt.Component
true
if the component is valid;
false
otherwise.public boolean hasToolTips()
true
if ToolTips are enabled.true
if ToolTips are enabled.public boolean hasStatusTips()
true
if StatusTips are enabled.true
if StatusTips are enabled.public boolean setToolTips(boolean tip)
tip
- if true
, ToolTips were enabled, otherwise disabledpublic boolean setStatusTips(boolean tip)
tip
- if true
, ToolTips were enabled, otherwise disabledpublic java.lang.String getToolTip(int x, int y)
ToolTipper
) if the mouse rests
over the object.getToolTip
in interface ToolTip
x,y
- the position of the mouse in component coordinatespublic java.lang.String getStatusTip(int x, int y)
getStatusTip
in interface ToolTip
x,y
- the position of the mouse in component coordinatespublic void setCursor(java.awt.Cursor cursor, DrawAtom owner)
cursor
- the java.awt.Cursor
to setowner
- the owner of the mouse curosor.public void removeCursor(DrawAtom owner)
owner
- the owner of the mouse curosor.public void addGeneralAWTEventListener(GeneralAWTEventListener listener)
GeneralAWTEventListener
to receive all
AWTEvents
from this
DisplayManager.listener
- the GeneralAWTEventListener
public void removeGeneralAWTEventListener(GeneralAWTEventListener listener)
GeneralAWTEventListener
so that it no
longer receives all AWTEvents
from this
DisplayManager.listener
- the GeneralAWTEventListener
public boolean containsGeneralAWTEventListener(GeneralAWTEventListener listener)
listener
- the event listener to checkpublic void addModifyListener(ModifyListener listener)
ModifyListener
to receive ModifyEvent
s
from this
DisplayManager.listener
- the ModifyListener
public void removeModifyListener(ModifyListener listener)
ModifyListener
so that it no longer
receives ModifyEvent
s from this
DisplayManager.listener
- the ModifyListener
public boolean containsModifyListener(ModifyListener listener)
listener
- the event listener to checkprotected void processEvent(java.awt.AWTEvent e)
GeneralAWTEventListener
s and then the the appropriate
process<event type>Event
method for
the given class of event.processEvent
in class java.awt.Component
e
- the event.Component.processComponentEvent(java.awt.event.ComponentEvent)
,
Component.processFocusEvent(java.awt.event.FocusEvent)
,
Component.processKeyEvent(java.awt.event.KeyEvent)
,
Component.processMouseEvent(java.awt.event.MouseEvent)
,
Component.processMouseMotionEvent(java.awt.event.MouseEvent)
,
Component.processInputMethodEvent(java.awt.event.InputMethodEvent)
,
processModifyEvent(gishur.core.event.ModifyEvent)
protected void processModifyEvent(ModifyEvent e)
e
- the ModifyEvent
public java.awt.Point lastMousePosition()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |