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 container
    void endMeasureOverride()
    End MeasureOverride operation
    java.lang.Object getGraphicObject()
    The graphic Object hosted from the graphic container
    int getMeasureOverrideHeight()
    MeasureOverride Height
    int getMeasureOverrideWidth()
    MeasureOverride Width
    long getNativeWindowHandle()
    Retrieves the native handle to the hosting window
    boolean hasFocus()
    Get focus state
    boolean hasMeasureOverride()
    Return if the graphic container implements management of MeasureOverride
    boolean hasWndProcHandler()
    Return if the graphic container implements management for WndProc
    void initiaize​(long hwndHost)
    Initialize the graphic container
    boolean isRemoteManaged()
    Return if the graphic container implements embedding styles and all management for window placement
    void setSizeAndVisibility​(boolean isVisible, int x, int y, int width, int height)
    Sets visibility and bounding rectangle
    void startMeasureOverride​(int width, int height)
    Starts a MeasureOverride operation
    boolean wndProcHandler​(long hwnd, int msg, long wParam, long lParam, boolean handled)
    Accesses the window process (handle) of the hosted child window

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • initiaize

      public void initiaize​(long hwndHost)
      Initialize the graphic container
      Specified by:
      initiaize in interface IJCGraphicContainer
      Parameters:
      hwndHost - The HWND of the hosting application
    • destroy

      public void destroy()
      Destroy the graphic container
      Specified by:
      destroy in interface IJCGraphicContainer
    • isRemoteManaged

      public boolean isRemoteManaged()
      Return if the graphic container implements embedding styles and all management for window placement

      On 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 interface IJCGraphicContainer
      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 interface IJCGraphicContainer
      Parameters:
      isVisible - Set visibility
      x - 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 interface IJCGraphicContainer
      Returns:
      True if the object manages MeasureOverride
    • startMeasureOverride

      public void startMeasureOverride​(int width, int height)
      Starts a MeasureOverride operation
      Specified by:
      startMeasureOverride in interface IJCGraphicContainer
      Parameters:
      width - The width constraint received
      height - The height constraint received
    • getMeasureOverrideWidth

      public int getMeasureOverrideWidth()
      MeasureOverride Width
      Specified by:
      getMeasureOverrideWidth in interface IJCGraphicContainer
      Returns:
      The width measured
    • getMeasureOverrideHeight

      public int getMeasureOverrideHeight()
      MeasureOverride Height
      Specified by:
      getMeasureOverrideHeight in interface IJCGraphicContainer
      Returns:
      The height measured
    • endMeasureOverride

      public void endMeasureOverride()
      End MeasureOverride operation
      Specified by:
      endMeasureOverride in interface IJCGraphicContainer
    • hasWndProcHandler

      public boolean hasWndProcHandler()
      Return if the graphic container implements management for WndProc
      Specified by:
      hasWndProcHandler in interface IJCGraphicContainer
      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 interface IJCGraphicContainer
      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 interface IJCGraphicContainer
      Returns:
      the focus state of the graphic container
    • getNativeWindowHandle

      public long getNativeWindowHandle()
      Retrieves the native handle to the hosting window

      Specified by:
      getNativeWindowHandle in interface IJCGraphicContainer
      Returns:
      The native pointer
    • getGraphicObject

      public java.lang.Object getGraphicObject()
      The graphic Object hosted from the graphic container

      Specified by:
      getGraphicObject in interface IJCGraphicContainer
      Returns:
      Object hosted