Package org.mases.jcobridge.swt
Class JCSWTGraphicContainer
java.lang.Object
org.mases.jcobridge.swt.JCSWTGraphicContainer
- All Implemented Interfaces:
IJCGraphicContainer
public abstract class JCSWTGraphicContainer extends java.lang.Object implements IJCGraphicContainer
-
Constructor Summary
Constructors Constructor Description JCSWTGraphicContainer()
-
Method Summary
Modifier and Type Method Description void
destroy()
Destroy the graphic containervoid
endMeasureOverride()
End MeasureOverride operationjava.lang.Object
getGraphicObject()
The graphicObject
hosted from the graphic containerint
getMeasureOverrideHeight()
MeasureOverride Heightint
getMeasureOverrideWidth()
MeasureOverride Widthlong
getNativeWindowHandle()
Retrieves the native handle to the hosting windowboolean
hasFocus()
Get focus stateboolean
hasMeasureOverride()
Return if the graphic container implements management of MeasureOverrideboolean
hasWndProcHandler()
Return if the graphic container implements management for WndProcvoid
initiaize(long hwndHost)
Initialize the graphic containerboolean
isRemoteManaged()
Return if the graphic container implements embedding styles and all management for window placementvoid
setSizeAndVisibility(boolean isVisible, int x, int y, int width, int height)
Sets visibility and bounding rectanglevoid
startMeasureOverride(int width, int height)
Starts a MeasureOverride operationboolean
wndProcHandler(long hwnd, int msg, long wParam, long lParam, boolean handled)
Accesses the window process (handle) of the hosted child window
-
Constructor Details
-
JCSWTGraphicContainer
public JCSWTGraphicContainer()
-
-
Method Details
-
initiaize
public void initiaize(long hwndHost)Initialize the graphic container- Specified by:
initiaize
in interfaceIJCGraphicContainer
- Parameters:
hwndHost
- The HWND of the hosting application
-
destroy
public void destroy()Destroy the graphic container- Specified by:
destroy
in interfaceIJCGraphicContainer
-
isRemoteManaged
public boolean isRemoteManaged()Return if the graphic container implements embedding styles and all management for window placementOn Windows this means to remove from the HWND: WS_CAPTION | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_SYSMENU and add the child behavior using WS_CHILDWINDOW
- Specified by:
isRemoteManaged
in interfaceIJCGraphicContainer
- Returns:
- True if the graphic container implements embedding styles and management
-
setSizeAndVisibility
public void setSizeAndVisibility(boolean isVisible, int x, int y, int width, int height)Sets visibility and bounding rectangle- Specified by:
setSizeAndVisibility
in interfaceIJCGraphicContainer
- Parameters:
isVisible
- Set visibilityx
- The x-axis value of the left side of the rectangle.y
- The y-axis value of the top side of the rectangle.width
- A positive number that represents the width of the rectangle.height
- A positive number that represents the height of the rectangle.
-
hasMeasureOverride
public boolean hasMeasureOverride()Return if the graphic container implements management of MeasureOverride- Specified by:
hasMeasureOverride
in interfaceIJCGraphicContainer
- Returns:
- True if the object manages MeasureOverride
-
startMeasureOverride
public void startMeasureOverride(int width, int height)Starts a MeasureOverride operation- Specified by:
startMeasureOverride
in interfaceIJCGraphicContainer
- Parameters:
width
- The width constraint receivedheight
- The height constraint received
-
getMeasureOverrideWidth
public int getMeasureOverrideWidth()MeasureOverride Width- Specified by:
getMeasureOverrideWidth
in interfaceIJCGraphicContainer
- Returns:
- The width measured
-
getMeasureOverrideHeight
public int getMeasureOverrideHeight()MeasureOverride Height- Specified by:
getMeasureOverrideHeight
in interfaceIJCGraphicContainer
- Returns:
- The height measured
-
endMeasureOverride
public void endMeasureOverride()End MeasureOverride operation- Specified by:
endMeasureOverride
in interfaceIJCGraphicContainer
-
hasWndProcHandler
public boolean hasWndProcHandler()Return if the graphic container implements management for WndProc- Specified by:
hasWndProcHandler
in interfaceIJCGraphicContainer
- Returns:
- True if the object manages WndProc
-
wndProcHandler
public boolean wndProcHandler(long hwnd, int msg, long wParam, long lParam, boolean handled)Accesses the window process (handle) of the hosted child window- Specified by:
wndProcHandler
in interfaceIJCGraphicContainer
- Parameters:
hwnd
- : The window handle of the hosted window.msg
- : The message to act upon.wParam
- : Information that may be relevant to handling the message. This is typically used to store small pieces of information, such as flags.lParam
- : Information that may be relevant to handling the message. This is typically used to reference an object.handled
- : The handled value coming from the orginal call.- Returns:
- True if the event was handled
-
hasFocus
public boolean hasFocus()Get focus state- Specified by:
hasFocus
in interfaceIJCGraphicContainer
- Returns:
- the focus state of the graphic container
-
getNativeWindowHandle
public long getNativeWindowHandle()Retrieves the native handle to the hosting window- Specified by:
getNativeWindowHandle
in interfaceIJCGraphicContainer
- Returns:
- The native pointer
-
getGraphicObject
public java.lang.Object getGraphicObject()The graphicObject
hosted from the graphic container- Specified by:
getGraphicObject
in interfaceIJCGraphicContainer
- Returns:
Object
hosted
-