Package xtwm.ui

Class Desktop

  • All Implemented Interfaces:
    java.lang.Comparable<TWidget>

    public class Desktop
    extends TDesktop
    Desktop is a desktop background and tiled panels manager.
    • Constructor Detail

      • Desktop

        public Desktop​(TApplication parent)
        Public constructor.
        Parameters:
        parent - parent application
    • Method Detail

      • onClose

        public void onClose()
        Close all open widgets on this desktop.
        Overrides:
        onClose in class TWindow
      • onMouseDown

        public void onMouseDown​(TMouseEvent mouse)
        Handle mouse press events.
        Overrides:
        onMouseDown in class TDesktop
        Parameters:
        mouse - mouse button press event
      • draw

        public void draw()
        The default TDesktop draws a hatch character across everything.
        Overrides:
        draw in class TDesktop
      • getAttributes

        public CellAttributes getAttributes()
        Get the attributes for the background.
        Returns:
        the background attributes
      • setAttributes

        public void setAttributes​(CellAttributes attributes)
        Set the attributes for the background.
        Parameters:
        attributes - the attributes
      • nextPanel

        public void nextPanel()
        Activate the next panel on this desktop.
      • previousPanel

        public void previousPanel()
        Activate the next panel on this desktop.
      • addPanel

        public void addPanel​(TWidget widget)
        Add a panel to this desktop.
        Parameters:
        widget - the panel widget
      • removePanel

        public void removePanel​(TWidget widget)
        Remove a panel from this desktop.
        Parameters:
        widget - the panel widget
      • setFocusFollowsMouse

        public void setFocusFollowsMouse​(boolean focusFollowsMouse)
        Set focusFollowsMouse flag.
        Parameters:
        focusFollowsMouse - if true, focus follows mouse: panels are automatically activated if the mouse passes over them
      • getFocusFollowsMouse

        public boolean getFocusFollowsMouse()
        Get focusFollowsMouse flag.
        Returns:
        true if focus follows mouse: panels automatically activate if the mouse passes over them