|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Panel
|
+--amber.awt.DrawPanel
This class extends panel. It is used to allow the normal Amber panel based controls access to functions which normally would not be possible.
| Inner classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
static int |
BorderDown
|
static int |
BorderNone
A constant defining the type of border to draw. |
static int |
BorderUp
|
static int |
BottomAligned
|
static int |
Centre
|
static int |
CentreAligned
|
static int |
Default
Constants for DrawString which defines where the text will be rendered. |
static int |
DrawArc
|
static int |
DrawImage
A constant defining the operation to perform. |
static int |
DrawLine
|
static int |
DrawOval
|
static int |
DrawPolygon
|
static int |
DrawPolyline
|
static int |
DrawRect
|
static int |
DrawString
|
static int |
Filled
|
static int |
Filled3D
|
static int |
Left
|
static int |
None
Constants for DrawRect which defines the type of rectangle. |
static int |
None3D
|
static int |
RectDown
|
static int |
RectUp
|
protected boolean |
redrawState
The current autoredraw state. |
static int |
Right
|
static int |
Round
|
static int |
RoundFilled
|
static int |
SetClip
|
static int |
SetColour
|
static int |
SetFont
|
static int |
SetPaintMode
|
static int |
SetXorMode
|
static int |
TopAligned
|
| 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 | |
DrawPanel()
|
|
| Method Summary | |
void |
addOperation(java.lang.Object data,
int[] drawInfo)
Calling this function adds an operation into the cache of operations. |
protected void |
drawBorder(int type,
java.awt.Dimension d,
java.awt.Graphics g)
|
protected void |
drawImage(java.awt.Image image,
java.awt.Dimension d,
int[] info,
java.awt.Graphics g,
int xOffset,
int yOffset)
|
void |
insertOperation(java.lang.Object data,
int[] drawInfo,
int location)
Calling this function inserts an operation into the cache of operations at the specified location in the operations sequence. |
void |
paint(java.awt.Graphics g)
The actual paint function. |
void |
removeAllOperations()
Calling this function removes all existing operations from the cache of operations. |
void |
removeOperation(int index)
Calling this function removes an existing operation from the cache of operations. |
protected void |
render(java.awt.Graphics drawGraphics,
java.awt.Dimension d)
This is the function called to render the draw operations onto the draw panel. |
void |
renderOperation(java.awt.Graphics drawGraphics,
java.awt.Dimension d,
int[] drawInfo,
java.lang.Object drawObject,
int x,
int y)
This function renders one individual operation to the specified graphics context. |
void |
replaceOperation(java.lang.Object data,
int[] drawInfo,
int location)
Calling this function modifies the specified operation and replaces it with the input operation. |
void |
setAutoRepaint(boolean state)
This sets the state of the automatic repaint functionality. |
void |
setBorder(int type)
This function sets the border on the panel. |
void |
update(java.awt.Graphics g)
Overrides the update function to turn off background drawing. |
| Methods inherited from class java.awt.Panel |
addNotify, getAccessibleContext |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, validate, validateTree |
| 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, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int BorderNone
public static final int BorderUp
public static final int BorderDown
public static final int DrawImage
public static final int DrawString
public static final int SetColour
public static final int DrawLine
public static final int DrawRect
public static final int DrawOval
public static final int DrawArc
public static final int DrawPolygon
public static final int DrawPolyline
public static final int SetClip
public static final int SetPaintMode
public static final int SetXorMode
public static final int SetFont
public static final int None
public static final int Filled
public static final int None3D
public static final int Filled3D
public static final int Round
public static final int RoundFilled
public static final int RectUp
public static final int RectDown
public static final int Default
public static final int Left
public static final int Centre
public static final int Right
public static final int TopAligned
public static final int CentreAligned
public static final int BottomAligned
protected boolean redrawState
| Constructor Detail |
public DrawPanel()
| Method Detail |
public void setAutoRepaint(boolean state)
state - boolean if true then auto repaint is enabled.
public void addOperation(java.lang.Object data,
int[] drawInfo)
data - The Object required for the operation.drawInfo - int array of drawing information. The array always has
at least two elements: the operation and a flags int in that order.
Other data in the array depend on the operation being performed.
public void insertOperation(java.lang.Object data,
int[] drawInfo,
int location)
data - The Object required for the operation.drawInfo - int array of drawing information. The array always has
at least two elements: the operation and a flags int in that order.
Other data in the array depend on the operation being performed.location - int location in the sequence of operations to insert
the operation at.
public void replaceOperation(java.lang.Object data,
int[] drawInfo,
int location)
data - The Object required for the operation.drawInfo - int array of drawing information. The array always has
at least two elements: the operation and a flags int in that order.
Other data in the array depend on the operation being performed.location - int location in the sequence of operations of the
operation to replace.public void removeOperation(int index)
index - int index of the operation to remove.public void removeAllOperations()
public void setBorder(int type)
type - int containing the type of panel. This is one of the
constants specified here.public void update(java.awt.Graphics g)
update in class java.awt.Containerg - Graphics context to draw on.public void paint(java.awt.Graphics g)
paint in class java.awt.Containerg - Graphics context to render in.
protected void render(java.awt.Graphics drawGraphics,
java.awt.Dimension d)
drawGraphics - Graphics context to render to.d - Dimension size of the rendering area.
public void renderOperation(java.awt.Graphics drawGraphics,
java.awt.Dimension d,
int[] drawInfo,
java.lang.Object drawObject,
int x,
int y)
drawGraphics - Graphics context to render to.d - Dimension of the Graphics context.drawInfo - int array containing the parameters of the operation and
the operation itself.drawObject - Object which is additional information required by the operation.x - int horizontal offset to add to the operation.y - int vertical offset to add to the operation.
protected void drawImage(java.awt.Image image,
java.awt.Dimension d,
int[] info,
java.awt.Graphics g,
int xOffset,
int yOffset)
protected void drawBorder(int type,
java.awt.Dimension d,
java.awt.Graphics g)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||