public abstract class DesignerControlAdapter extends Object implements IDesignerControl
| Constructor and Description |
|---|
DesignerControlAdapter() |
| Modifier and Type | Method and Description |
|---|---|
protected JComponent |
createComponent(PanelDesignerControl controller,
PhantomFile data)
Creates the component with the specified data.
|
JComponent |
createComponent(PanelDesignerControl controller,
PhantomFile data,
Object previousAttachment)
Creates the component with the specified data.
|
int |
getControlSBSize(PanelDesignerControl controller,
int cx,
int cy)
Gets the size of the scroll-bar enabled part of the control.
|
String |
getText(PanelDesignerControl controller)
Gets the text of the component as possible.
|
boolean |
isSupported(byte[] data)
Checks if this data is supported.
|
boolean |
needsImmediateCreation(byte[] data)
Checks if component needs immediate creation in the Win32 thread.
|
void |
onDestroy(PanelDesignerControl controller)
Called when destroyed.
|
void |
onImageUpdate(PanelDesignerControl controller)
Called when the component needs to update its image due to change of panel font and/or background color.
|
int |
onMouse(PanelDesignerControl controller,
int operation,
int x,
int y)
The method called from JNI.
|
void |
onTurnPage(PanelDesignerControl controller,
int page)
Called when the JNI notebook turns page.
|
int[] |
onWindowPositionChanging(PanelDesignerControl controller,
int x,
int y,
int cx,
int cy)
Called by Win32 to adjust the window position before it is changed.
|
void |
postPaint(PanelDesignerControl controller,
Graphics2D g,
JComponent c,
int cx,
int cy)
Performs a post-paint.
|
void |
prePaint(PanelDesignerControl controller,
Graphics2D g,
JComponent c,
int cx,
int cy)
Performs a pre-paint.
|
void |
setBounds(PanelDesignerControl controller,
JComponent c,
int x,
int y,
int cx,
int cy)
Sets the bounds of the component.
|
boolean |
setText(PanelDesignerControl controller,
String text)
Sets the text of the component if possible.
|
boolean |
wantMouseMessages()
Checks if this implementor wants mouse messages.
|
public boolean isSupported(byte[] data)
isSupported in interface IDesignerControldata - The in-memory control data.public boolean needsImmediateCreation(byte[] data)
needsImmediateCreation in interface IDesignerControlpublic JComponent createComponent(PanelDesignerControl controller, PhantomFile data, Object previousAttachment) throws IOException
createComponent in interface IDesignerControlcontroller - The controller.data - The in-memory control data.previousAttachment - The previous attachment if non-null.IOException - For file errors.protected JComponent createComponent(PanelDesignerControl controller, PhantomFile data) throws IOException
controller - The controller.data - The in-memory control data.IOException - For file errors.public void onImageUpdate(PanelDesignerControl controller)
onImageUpdate in interface IDesignerControlpublic void setBounds(PanelDesignerControl controller, JComponent c, int x, int y, int cx, int cy)
setBounds in interface IDesignerControlpublic void prePaint(PanelDesignerControl controller, Graphics2D g, JComponent c, int cx, int cy)
prePaint in interface IDesignerControlpublic void postPaint(PanelDesignerControl controller, Graphics2D g, JComponent c, int cx, int cy)
postPaint in interface IDesignerControlpublic boolean wantMouseMessages()
wantMouseMessages in interface IDesignerControlpublic int onMouse(PanelDesignerControl controller, int operation, int x, int y)
onMouse in interface IDesignerControloperation - Mouse operation: MOUSEMOVE, BUTTONDOWN, BUTTONUP, BUTTONDBLCLK or CAPTURECHANGED.x - Mouse position X relative the window.y - Mouse position Y relative the window.controller - The controller.public int getControlSBSize(PanelDesignerControl controller, int cx, int cy)
getControlSBSize in interface IDesignerControlcx - The current width.cy - The current height.public int[] onWindowPositionChanging(PanelDesignerControl controller, int x, int y, int cx, int cy)
onWindowPositionChanging in interface IDesignerControlpublic String getText(PanelDesignerControl controller)
getText in interface IDesignerControlpublic void onTurnPage(PanelDesignerControl controller, int page)
onTurnPage in interface IDesignerControlpublic boolean setText(PanelDesignerControl controller, String text)
setText in interface IDesignerControlpublic void onDestroy(PanelDesignerControl controller)
onDestroy in interface IDesignerControlPhantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.