JLightweightFrame class
communicates to its client application.
The client application implements this interface so it can response
to requests and process notifications from JLightweightFrame.
An implementation of this interface is associated with a JLightweightFrame instance via the JLightweightFrame#setContent
method.
A hierarchy of components contained in the JComponent instance
returned by the getComponent method should not contain any
heavyweight components, otherwise JLightweightFrame may fail
to paint it.
| Modifier and Type | Method and Description |
|---|---|
| public default void | |
| public default <T extends DragGestureRecognizer> T | createDragGestureRecognizer(Class<T> abstractRecognizerClass, DragSource ds, Component c, int srcActions, DragGestureListener dgl)
Create a drag gesture recognizer for the lightweight frame. |
| public default DragSourceContextPeer | createDragSourceContextPeer(DragGestureEvent dge)
Create a drag source context peer for the lightweight frame. |
| public void | focusGrabbed()
|
| public void | focusUngrabbed()
|
| public JComponent | Returns: the component to paintThe client application overrides this method to return the |
| public default void | imageBufferReset(int[]
the content pixel data buffer of INT_ARGB_PRE type data, int the logical x coordinate of the image x, int the logical y coordinate of the image y, int the logical width of the image width, int the logical height of the image height, int the line stride of the pixel buffer linestride, int the scale factor of the pixel buffer scale)
Deprecated
since 9. replaced by
imageBufferReset(int[], int, int, int, int, int, double, double)
|
| public default void | imageBufferReset(int[]
the content pixel data buffer of INT_ARGB_PRE type data, int the logical x coordinate of the image x, int the logical y coordinate of the image y, int the logical width of the image width, int the logical height of the image height, int the line stride of the pixel buffer linestride, double the x coordinate scale factor of the pixel buffer scaleX, double the y coordinate scale factor of the pixel buffer scaleY)
|
| public default void | imageBufferReset(int[] data, int x, int y, int width, int height, int linestride)
The default implementation for #imageBufferReset uses a hard-coded value of 1 for the scale factor. |
| public void | imageReshaped(int
the x coordinate of the image x, int the y coordinate of the image y, int the width of the image width, int the height of the image height)
|
| public void | imageUpdated(int
the x coordinate of the dirty rectangle,
relative to the image origin dirtyX, int the y coordinate of the dirty rectangle,
relative to the image origin dirtyY, int the width of the dirty rectangle dirtyWidth, int the height of the dirty rectangle dirtyHeight)
|
| public void | maximumSizeChanged(int width, int height)
|
| public void | minimumSizeChanged(int width, int height)
|
| public void | paintLock()
|
| public void | paintUnlock()
|
| public void | preferredSizeChanged(int width, int height)
|
| public default void | |
| public default void |
| addDropTarget | back to summary |
|---|---|
| public default void addDropTarget(DropTarget dt) Adds a drop target to the lightweight frame. | |
| createDragGestureRecognizer | back to summary |
|---|---|
| public default <T extends DragGestureRecognizer> T createDragGestureRecognizer(Class<T> abstractRecognizerClass, DragSource ds, Component c, int srcActions, DragGestureListener dgl) Create a drag gesture recognizer for the lightweight frame. | |
| createDragSourceContextPeer | back to summary |
|---|---|
| public default DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException Create a drag source context peer for the lightweight frame. | |
| focusGrabbed | back to summary |
|---|---|
| public void focusGrabbed()
| |
| focusUngrabbed | back to summary |
|---|---|
| public void focusUngrabbed()
| |
| getComponent | back to summary |
|---|---|
| public JComponent getComponent() The client application overrides this method to return the
| |
| imageBufferReset | back to summary |
|---|---|
| public default void imageBufferReset(int[] data, int x, int y, int width, int height, int linestride, int scale)
The method reports a reference to the pixel data buffer, the content
image bounds within the buffer and the line stride of the buffer.
These values have the following correlation.
The
| |
| imageBufferReset | back to summary |
|---|---|
| public default void imageBufferReset(int[] data, int x, int y, int width, int height, int linestride, double scaleX, double scaleY)
The method reports a reference to the pixel data buffer, the content
image bounds within the buffer and the line stride of the buffer.
These values have the following correlation.
The
| |
| imageBufferReset | back to summary |
|---|---|
| public default void imageBufferReset(int[] data, int x, int y, int width, int height, int linestride) The default implementation for #imageBufferReset uses a hard-coded value of 1 for the scale factor. Both the old and the new methods provide default implementations in order to allow a client application to run with any JDK version without breaking backward compatibility. | |
| imageReshaped | back to summary |
|---|---|
| public void imageReshaped(int x, int y, int width, int height)
| |
| imageUpdated | back to summary |
|---|---|
| public void imageUpdated(int dirtyX, int dirtyY, int dirtyWidth, int dirtyHeight)
| |
| maximumSizeChanged | back to summary |
|---|---|
| public void maximumSizeChanged(int width, int height)
| |
| minimumSizeChanged | back to summary |
|---|---|
| public void minimumSizeChanged(int width, int height)
| |
| paintLock | back to summary |
|---|---|
| public void paintLock()
| |
| paintUnlock | back to summary |
|---|---|
| public void paintUnlock()
| |
| preferredSizeChanged | back to summary |
|---|---|
| public void preferredSizeChanged(int width, int height)
| |
| removeDropTarget | back to summary |
|---|---|
| public default void removeDropTarget(DropTarget dt) Removes a drop target from the lightweight frame. | |
| setCursor | back to summary |
|---|---|
| public default void setCursor(Cursor cursor)
| |