public abstract class AbstractColorHelper extends Object implements GLG2DColorHelper
Constructor and Description |
---|
AbstractColorHelper() |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes the helper object.
|
Color |
getBackground() |
Color |
getColor() |
Composite |
getComposite() |
Paint |
getPaint() |
void |
pop(GLGraphics2D parentG2d)
Sets the new
GLGraphics2D context in a stack after a pop. |
void |
push(GLGraphics2D newG2d)
Sets the new
GLGraphics2D context in a stack. |
void |
resetHints()
Clears all hints back to their default states.
|
void |
setBackground(Color color) |
void |
setColor(Color c) |
void |
setComposite(Composite comp) |
void |
setG2D(GLGraphics2D g2d)
Sets the current
GLGraphics2D parent. |
void |
setHint(RenderingHints.Key key,
Object value)
Sets a new rendering hint.
|
void |
setPaint(Paint paint) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
copyArea, setColorNoRespectComposite, setColorRespectComposite, setPaintMode, setXORMode
public void setG2D(GLGraphics2D g2d)
G2DDrawingHelper
GLGraphics2D
parent. The current GL
and
GLContext
objects can be accessed from this. This should clear all
internal stacks in the helper object because previous painting iterations
may not have called dispose() for each time they called create().setG2D
in interface G2DDrawingHelper
g2d
- The parent context for subsequent drawing operations.public void push(GLGraphics2D newG2d)
G2DDrawingHelper
GLGraphics2D
context in a stack. This is called when
Graphics2D.create()
is called and each helper is given notice to
push any necessary information onto the stack. This is used in conjunction
with G2DDrawingHelper.pop(GLGraphics2D)
.push
in interface G2DDrawingHelper
newG2d
- The new context, top of the stack.public void pop(GLGraphics2D parentG2d)
G2DDrawingHelper
GLGraphics2D
context in a stack after a pop. This is
called when Graphics2D.dispose()
is called and each helper is given
notice to pop any necessary information off the stack. This is used in
conjunction with G2DDrawingHelper.push(GLGraphics2D)
.pop
in interface G2DDrawingHelper
parentG2d
- The new context, top of the stack - which is actually the parent
of what was popped.public void setHint(RenderingHints.Key key, Object value)
G2DDrawingHelper
GLGraphics2D
object, but all new state changes are propagated to
all listeners.setHint
in interface G2DDrawingHelper
key
- The rendering hint key.value
- The new hint value.public void resetHints()
G2DDrawingHelper
resetHints
in interface G2DDrawingHelper
public void dispose()
G2DDrawingHelper
Graphics2D
object. This should dispose all GL resources when
all drawing is finished and no more calls will be executing on this OpenGL
context and these resources.dispose
in interface G2DDrawingHelper
public void setComposite(Composite comp)
setComposite
in interface GLG2DColorHelper
public Composite getComposite()
getComposite
in interface GLG2DColorHelper
public void setColor(Color c)
setColor
in interface GLG2DColorHelper
public Color getColor()
getColor
in interface GLG2DColorHelper
public void setBackground(Color color)
setBackground
in interface GLG2DColorHelper
public Color getBackground()
getBackground
in interface GLG2DColorHelper
public void setPaint(Paint paint)
setPaint
in interface GLG2DColorHelper
public Paint getPaint()
getPaint
in interface GLG2DColorHelper
Copyright © 2010-2013. All Rights Reserved.