Class SWTSkin


  • public class SWTSkin
    extends java.lang.Object
    • Field Detail

      • default_instance

        private static SWTSkin default_instance
      • DEBUGLAYOUT

        public boolean DEBUGLAYOUT
      • is_default

        private final boolean is_default
      • handCursorListener

        private static org.eclipse.swt.widgets.Listener handCursorListener
      • handCursor

        private static org.eclipse.swt.graphics.Cursor handCursor
      • mapIDsToSOs

        private java.util.HashMap<java.lang.String,​SWTSkinObject[]> mapIDsToSOs
      • mon_MapIDsToSOs

        private AEMonitor mon_MapIDsToSOs
      • mapTabSetToControls

        private java.util.HashMap<java.lang.String,​SWTSkinTabSet> mapTabSetToControls
      • mapPublicViewIDsToSOs

        private java.util.HashMap<java.lang.String,​SWTSkinObject[]> mapPublicViewIDsToSOs
      • mon_mapPublicViewIDsToSOs

        private AEMonitor mon_mapPublicViewIDsToSOs
      • mapPublicViewIDsToListeners

        private java.util.HashMap<java.lang.String,​java.util.ArrayList<SWTSkinObjectListener>> mapPublicViewIDsToListeners
      • mapPublicViewIDsToListeners_mon

        private AEMonitor mapPublicViewIDsToListeners_mon
      • skinComposite

        private org.eclipse.swt.widgets.Composite skinComposite
      • bLayoutComplete

        private boolean bLayoutComplete
      • currentSkinObjectcreationCount

        private int currentSkinObjectcreationCount
      • startID

        private java.lang.String startID
      • autoSizeOnLayout

        private boolean autoSizeOnLayout
      • constructionDepth

        private int constructionDepth
      • constructionCursor

        private org.eclipse.swt.graphics.Cursor constructionCursor
    • Constructor Detail

      • SWTSkin

        protected SWTSkin()
      • SWTSkin

        protected SWTSkin​(java.lang.ClassLoader classLoader,
                          java.lang.String skinPath,
                          java.lang.String mainSkinFile)
      • SWTSkin

        private SWTSkin​(SWTSkinProperties skinProperties,
                        boolean is_default)
    • Method Detail

      • getDefaultInstance

        protected static SWTSkin getDefaultInstance()
      • getSkinID

        public java.lang.String getSkinID()
      • addToControlMap

        public void addToControlMap​(SWTSkinObject skinObject)
      • addToSOArrayMap

        private void addToSOArrayMap​(java.util.Map<java.lang.String,​SWTSkinObject[]> arrayMap,
                                     AEMonitor mon,
                                     java.lang.String key,
                                     SWTSkinObject object)
      • getFromSOArrayMap

        private java.lang.Object getFromSOArrayMap​(java.util.Map<java.lang.String,​SWTSkinObject[]> arrayMap,
                                                   java.lang.Object key,
                                                   SWTSkinObject parent)
      • setSkinObjectViewID

        private void setSkinObjectViewID​(SWTSkinObject skinObject,
                                         java.lang.String sViewID)
      • getSkinObjectByID

        public SWTSkinObject getSkinObjectByID​(java.lang.String sID)
      • getSkinObject

        public SWTSkinObject getSkinObject​(java.lang.String sViewID)
      • createUnattachedView

        private SWTSkinObject createUnattachedView​(java.lang.String viewID,
                                                   SWTSkinObject parent)
        Parameters:
        viewID -
        Returns:
        Since:
        3.1.1.1
      • getTabSet

        public SWTSkinTabSet getTabSet​(java.lang.String sID)
      • setActiveTab

        public boolean setActiveTab​(java.lang.String sTabSetID,
                                    java.lang.String sTabViewID)
      • initialize

        public void initialize​(org.eclipse.swt.widgets.Composite skincomp,
                               java.lang.String startID)
        Since:
        3.0.5.3
      • initialize

        public void initialize​(org.eclipse.swt.widgets.Composite skincomp,
                               java.lang.String startID,
                               IUIIntializer uiInitializer)
      • disposeSkin

        private void disposeSkin()
        Since:
        4.0.0.5
      • layout

        public void layout​(SWTSkinObject soStart)
        private void addPaintListenerToAll(Control control) { // XXX: Bug: When paint listener is set to shell, browser widget will flicker on OSX when resizing if (!(control instanceof Shell)) { control.addListener(SWT.Paint, ontopPaintListener); } if (control instanceof Composite) { Composite composite = (Composite) control; Control[] children = composite.getChildren(); for (int i = 0; i < children.length; i++) { addPaintListenerToAll(children[i]); } } }
      • layout

        public void layout()
      • attachControl

        void attachControl​(SWTSkinObject skinObject)
      • createContainer

        private SWTSkinObject createContainer​(SWTSkinProperties properties,
                                              java.lang.String sID,
                                              java.lang.String sConfigID,
                                              java.lang.String[] sTypeParams,
                                              SWTSkinObject parentSkinObject,
                                              boolean bForceCreate,
                                              boolean bPropogate,
                                              SWTSkinObject intoSkinObject)
      • createMySash

        private SWTSkinObject createMySash​(SWTSkinProperties properties,
                                           java.lang.String sID,
                                           java.lang.String sConfigID,
                                           java.lang.String[] typeParams,
                                           SWTSkinObject parentSkinObject,
                                           boolean bVertical)
      • createTab

        public SWTSkinObjectTab createTab​(java.lang.String sID,
                                          java.lang.String sTemplateKey,
                                          SWTSkinObject tabHolder)
        Create a tab using a template.

        (objectid).view.template.(sTemplateKey)=(Reference to Template skin object)

        Parameters:
        sID - ID to give the new tab
        sTemplateKey - Template Key to read to get the tab's template skin object
        tabHolder - Where to read the template key from
        Returns:
        The new tab, or null if tab could not be created
      • getShell

        public org.eclipse.swt.widgets.Composite getShell()
      • getHandCursorListener

        protected static org.eclipse.swt.widgets.Listener getHandCursorListener​(org.eclipse.swt.widgets.Display display)
      • createSkinObject

        public SWTSkinObject createSkinObject​(java.lang.String sID,
                                              java.lang.String sConfigID,
                                              SWTSkinObject parentSkinObject)
      • constructionStart

        public void constructionStart()
      • constructionEnd

        public void constructionEnd()
      • createSkinObject

        public SWTSkinObject createSkinObject​(java.lang.String sID,
                                              java.lang.String sConfigID,
                                              SWTSkinObject parentSkinObject,
                                              java.lang.Object datasource)
        Create a skin object based off an existing config "template"
        Parameters:
        sID - ID of new skin object
        sConfigID - config id to use to create new skin object
        parentSkinObject - location to place new skin object in
        Returns:
        new skin object
      • addSkinObject

        public void addSkinObject​(SWTSkinObject skinObject)
      • removeSkinObject

        public void removeSkinObject​(SWTSkinObject skinObject)
        Parameters:
        skinObject -
        Since:
        3.0.1.3
      • linkIDtoParent

        private SWTSkinObject linkIDtoParent​(SWTSkinProperties properties,
                                             java.lang.String sID,
                                             java.lang.String sConfigID,
                                             SWTSkinObject parentSkinObject,
                                             boolean bForceCreate,
                                             boolean bAddView,
                                             java.lang.Object datasource)
      • createButton

        private SWTSkinObject createButton​(SWTSkinProperties properties,
                                           java.lang.String id,
                                           java.lang.String configID,
                                           java.lang.String[] typeParams,
                                           SWTSkinObject parentSkinObject)
        Parameters:
        properties -
        id -
        configID -
        typeParams -
        parentSkinObject -
        Returns:
        Since:
        3.1.1.1
      • createBrowser

        private SWTSkinObject createBrowser​(SWTSkinProperties properties,
                                            java.lang.String sID,
                                            java.lang.String sConfigID,
                                            SWTSkinObject parentSkinObject)
        Parameters:
        properties -
        sID -
        sConfigID -
        parentSkinObject -
        Returns:
      • removeListener

        public void removeListener​(java.lang.String viewID,
                                   SWTSkinObjectListener listener)
      • getSkinObjectListeners

        public SWTSkinObjectListener[] getSkinObjectListeners​(java.lang.String viewID)
      • isLayoutComplete

        public boolean isLayoutComplete()
      • main

        public static void main​(java.lang.String[] args)
      • isCreatingSO

        public boolean isCreatingSO()
      • triggerLanguageChange

        public void triggerLanguageChange()
        Since:
        3.1.1.1
      • setAutoSizeOnLayout

        public void setAutoSizeOnLayout​(boolean autoSizeOnLayout)
      • isAutoSizeOnLayout

        public boolean isAutoSizeOnLayout()
      • disposeDefault

        public static void disposeDefault()