Class InternalFrameAdapter

    • Constructor Detail

      • InternalFrameAdapter

        public InternalFrameAdapter​(boolean center)
        Creates a new instance of InternalFrameAdapter.
        Parameters:
        center - a flag whether the internal frame should be centered
    • Method Detail

      • open

        public void open()
        Opens this internal frame. This will be done synchronously on the event dispatch thread.
        Specified by:
        open in interface net.sf.jguiraffe.gui.builder.window.Window
      • close

        public boolean close​(boolean force)
        Closes this window. This implementation delegates to the WindowHelper.
        Specified by:
        close in interface net.sf.jguiraffe.gui.builder.window.Window
        Parameters:
        force - the force flag
        Returns:
        a flag whether the window could be closed
      • getXPos

        public int getXPos()
        Returns the xpos of this internal frame.
        Specified by:
        getXPos in interface net.sf.jguiraffe.gui.builder.window.Window
        Returns:
        the xpos
      • getYPos

        public int getYPos()
        Returns the ypos of this internal frame.
        Specified by:
        getYPos in interface net.sf.jguiraffe.gui.builder.window.Window
        Returns:
        the ypos
      • addWindowListener

        public void addWindowListener​(net.sf.jguiraffe.gui.builder.window.WindowListener l)
        Registers the specified listener at this window.
        Specified by:
        addWindowListener in interface net.sf.jguiraffe.gui.builder.window.Window
        Parameters:
        l - the new listener
      • removeWindowListener

        public void removeWindowListener​(net.sf.jguiraffe.gui.builder.window.WindowListener l)
        Removes the specified window listener.
        Specified by:
        removeWindowListener in interface net.sf.jguiraffe.gui.builder.window.Window
        Parameters:
        l - the listener to remove
      • getWindowClosingStrategy

        public net.sf.jguiraffe.gui.builder.window.WindowClosingStrategy getWindowClosingStrategy()
        Returns this window's closing strategy.
        Specified by:
        getWindowClosingStrategy in interface net.sf.jguiraffe.gui.builder.window.Window
        Returns:
        the window closing strategy
      • setWindowClosingStrategy

        public void setWindowClosingStrategy​(net.sf.jguiraffe.gui.builder.window.WindowClosingStrategy windowClosingStrategy)
        Sets the closing strategy for this window.
        Specified by:
        setWindowClosingStrategy in interface net.sf.jguiraffe.gui.builder.window.Window
        Parameters:
        windowClosingStrategy - the new closing strategy
      • getWindowController

        public Object getWindowController()
        Returns this window's controller.
        Specified by:
        getWindowController in interface net.sf.jguiraffe.gui.builder.window.Window
        Returns:
        the controller
      • getRootContainer

        public Object getRootContainer()
        Returns the root container for this internal frame. This is the frame's content pane.
        Specified by:
        getRootContainer in interface net.sf.jguiraffe.gui.builder.window.Window
        Returns:
        the root container
      • getParentWindow

        public net.sf.jguiraffe.gui.builder.window.Window getParentWindow()
        Returns this window's parent.
        Specified by:
        getParentWindow in interface net.sf.jguiraffe.gui.builder.window.Window
        Returns:
        the parent window
      • getWindowListeners

        public Collection<net.sf.jguiraffe.gui.builder.window.WindowListener> getWindowListeners()
        Returns a collection with the registered window listeners.
        Specified by:
        getWindowListeners in interface SwingWindow
        Returns:
        the registered window listeners
      • getWindowHelper

        public final net.sf.jguiraffe.gui.platform.swing.builder.window.WindowHelper getWindowHelper()
        Returns the window helper used by this window implementation.
        Specified by:
        getWindowHelper in interface SwingWindow
        Returns:
        the window helper
      • getComponent

        public Component getComponent()
        Returns the component representing this window.
        Specified by:
        getComponent in interface SwingWindow
        Returns:
        the component
      • setParentWindow

        public void setParentWindow​(net.sf.jguiraffe.gui.builder.window.Window parent)
        Sets this window's parent window.
        Specified by:
        setParentWindow in interface SwingWindow
        Parameters:
        parent - the new parent
      • setWindowController

        public void setWindowController​(Object ctrl)
        Sets the window's controller.
        Specified by:
        setWindowController in interface SwingWindow
        Parameters:
        ctrl - the new controller
      • packWindow

        public void packWindow()
        Packs this internal frame. This method delegates to the inherited pack() method.
        Specified by:
        packWindow in interface SwingWindow
      • addMouseListener

        public void addMouseListener​(net.sf.jguiraffe.gui.builder.event.FormMouseListener l)
        Adds a mouse listener to this window. This implementation delegates to the WindowHelper.
        Specified by:
        addMouseListener in interface net.sf.jguiraffe.gui.builder.window.Window
        Parameters:
        l - the listener to be added
      • removeMouseListener

        public void removeMouseListener​(net.sf.jguiraffe.gui.builder.event.FormMouseListener l)
        Removes a mouse listener from this window. This implementation delegates to the WindowHelper.
        Specified by:
        removeMouseListener in interface net.sf.jguiraffe.gui.builder.window.Window
        Parameters:
        l - the listener to be removed
      • registerAutoCloseListener

        public void registerAutoCloseListener()
        Registers an internal listener that handles auto-close operations. This implementation registers an InternalFrameListener that reacts on the internalFrameClosing event and then delegates to the window helper in order to close this internal frame.
        Specified by:
        registerAutoCloseListener in interface SwingWindow