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 voiddestroy()Destroy the graphic containervoidendMeasureOverride()End MeasureOverride operationjava.lang.ObjectgetGraphicObject()The graphicObjecthosted from the graphic containerintgetMeasureOverrideHeight()MeasureOverride HeightintgetMeasureOverrideWidth()MeasureOverride WidthlonggetNativeWindowHandle()Retrieves the native handle to the hosting windowbooleanhasFocus()Get focus statebooleanhasMeasureOverride()Return if the graphic container implements management of MeasureOverridebooleanhasWndProcHandler()Return if the graphic container implements management for WndProcvoidinitiaize(long hwndHost)Initialize the graphic containerbooleanisRemoteManaged()Return if the graphic container implements embedding styles and all management for window placementvoidsetSizeAndVisibility(boolean isVisible, int x, int y, int width, int height)Sets visibility and bounding rectanglevoidstartMeasureOverride(int width, int height)Starts a MeasureOverride operationbooleanwndProcHandler(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:
initiaizein interfaceIJCGraphicContainer- Parameters:
hwndHost- The HWND of the hosting application
-
destroy
public void destroy()Destroy the graphic container- Specified by:
destroyin 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:
isRemoteManagedin 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:
setSizeAndVisibilityin 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:
hasMeasureOverridein interfaceIJCGraphicContainer- Returns:
- True if the object manages MeasureOverride
-
startMeasureOverride
public void startMeasureOverride(int width, int height)Starts a MeasureOverride operation- Specified by:
startMeasureOverridein interfaceIJCGraphicContainer- Parameters:
width- The width constraint receivedheight- The height constraint received
-
getMeasureOverrideWidth
public int getMeasureOverrideWidth()MeasureOverride Width- Specified by:
getMeasureOverrideWidthin interfaceIJCGraphicContainer- Returns:
- The width measured
-
getMeasureOverrideHeight
public int getMeasureOverrideHeight()MeasureOverride Height- Specified by:
getMeasureOverrideHeightin interfaceIJCGraphicContainer- Returns:
- The height measured
-
endMeasureOverride
public void endMeasureOverride()End MeasureOverride operation- Specified by:
endMeasureOverridein interfaceIJCGraphicContainer
-
hasWndProcHandler
public boolean hasWndProcHandler()Return if the graphic container implements management for WndProc- Specified by:
hasWndProcHandlerin 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:
wndProcHandlerin 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:
hasFocusin interfaceIJCGraphicContainer- Returns:
- the focus state of the graphic container
-
getNativeWindowHandle
public long getNativeWindowHandle()Retrieves the native handle to the hosting window- Specified by:
getNativeWindowHandlein interfaceIJCGraphicContainer- Returns:
- The native pointer
-
getGraphicObject
public java.lang.Object getGraphicObject()The graphicObjecthosted from the graphic container- Specified by:
getGraphicObjectin interfaceIJCGraphicContainer- Returns:
Objecthosted
-