|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Canvas chrriis.dj.nativeswing.swtimpl.NativeComponent
public abstract class NativeComponent
A native component that gets connected to a native peer.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.Canvas |
---|
Canvas.AccessibleAWTCanvas |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
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 | |
---|---|
NativeComponent()
|
Method Summary | |
---|---|
abstract void |
createBackBuffer()
Create an image of the native peer as a back buffer, which can be used when painting the component, or to simulate alpha blending. |
protected abstract Component |
createEmbeddableComponent(Map<Object,Object> optionMap)
A native component instance cannot be added directly to a component hierarchy. |
abstract void |
destroyBackBuffer()
Destroy the back buffer. |
protected abstract void |
disposeNativePeer()
Explicitely dispose the native resources. |
protected abstract int |
getComponentID()
Get the unique identifier of this native component, used as a reference to communicate with the native peer. |
protected static ObjectRegistry |
getControlRegistry()
Get the registry of the controls, which references created controls using the component ID. |
protected static ObjectRegistry |
getNativeComponentRegistry()
Get the registry of the components, which references created components using the component ID. |
static NativeComponent[] |
getNativeComponents()
Get the native components that are currently registered, which may have an invalid native peer. |
protected abstract Object[] |
getNativePeerCreationParameters()
Get the parameters that are passed to the creation method. |
abstract boolean |
hasBackBuffer()
Indicate whether a back buffer is (still) stored in the component. |
abstract void |
initializeNativePeer()
Force the component to initialize. |
abstract boolean |
isNativePeerDisposed()
Indicate whether the native peer is disposed. |
abstract boolean |
isNativePeerInitialized()
Indicate whether the native peer initialization phase has happened. |
abstract boolean |
isNativePeerValid()
Indicate if the native peer is valid, which means initialized, not disposed, and alive (communication channel is alive). |
abstract void |
paintComponent(BufferedImage image)
Paint the native component including its native peer in an image. |
abstract void |
paintComponent(BufferedImage image,
Rectangle[] rectangles)
Paint the native component including its native peer in an image, in the areas that are specified. |
abstract void |
runAsync(CommandMessage commandMessage,
Object... args)
Run the given command if the control is created, or store it to run it when the creation occurs. |
abstract void |
runInSequence(Runnable runnable)
Run a command in sequence with other calls from this class. |
abstract Object |
runSync(CommandMessage commandMessage,
Object... args)
Run the given command if the control is created, or store it to run it when the creation occurs. |
abstract void |
updateBackBuffer(Rectangle[] rectangles)
Update (eventually creating an empty one if it does not exist) the back buffer on the area specified by the rectangles. |
abstract void |
updateBackBufferOnVisibleTranslucentAreas()
Update the back buffer on the areas that have non opaque overlays and that are not covered by opaque components. |
Methods inherited from class java.awt.Canvas |
---|
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, paint, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NativeComponent()
Method Detail |
---|
public abstract void runInSequence(Runnable runnable)
runnable
- the command to run in sequence with other method calls.public abstract Object runSync(CommandMessage commandMessage, Object... args)
commandMessage
- the command message to run.args
- the arguments to pass to the command message.
public abstract void runAsync(CommandMessage commandMessage, Object... args)
commandMessage
- the command message to run.args
- the arguments to pass to the command message.public static NativeComponent[] getNativeComponents()
protected static ObjectRegistry getNativeComponentRegistry()
protected static ObjectRegistry getControlRegistry()
protected abstract int getComponentID()
public abstract void initializeNativePeer()
protected abstract Object[] getNativePeerCreationParameters()
protected abstract void disposeNativePeer()
public abstract boolean isNativePeerDisposed()
public abstract boolean isNativePeerInitialized()
public abstract boolean isNativePeerValid()
protected abstract Component createEmbeddableComponent(Map<Object,Object> optionMap)
optionMap
- the options to configure the behavior of this component.
public abstract void paintComponent(BufferedImage image)
image
- the image to paint to.public abstract void paintComponent(BufferedImage image, Rectangle[] rectangles)
image
- the image to paint to.rectangles
- the area in which the component should be painted.public abstract void createBackBuffer()
public abstract boolean hasBackBuffer()
public abstract void updateBackBufferOnVisibleTranslucentAreas()
public abstract void updateBackBuffer(Rectangle[] rectangles)
rectangles
- the area to update.public abstract void destroyBackBuffer()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |