com.aelitis.azureus.ui.swt.skin
Class SWTSkin

java.lang.Object
  extended by com.aelitis.azureus.ui.swt.skin.SWTSkin

public class SWTSkin
extends java.lang.Object

Author:
TuxPaper

Field Summary
static boolean DEBUG_VISIBILITIES
           
 boolean DEBUGLAYOUT
           
 
Constructor Summary
protected SWTSkin()
           
protected SWTSkin(java.lang.ClassLoader classLoader, java.lang.String skinPath, java.lang.String mainSkinFile)
           
 
Method Summary
 SWTSkinObjectTab activateTab(SWTSkinObject skinObjectInTab)
           
 void addListener(java.lang.String viewID, SWTSkinObjectListener listener)
           
 void addListener(SWTSkinLayoutCompleteListener l)
           
 void addSkinObject(SWTSkinObject skinObject)
           
 void addToControlMap(SWTSkinObject skinObject)
           
 SWTSkinObject createSkinObject(java.lang.String sID, java.lang.String sConfigID, SWTSkinObject parentSkinObject)
           
 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"
 SWTSkinObjectTab createTab(java.lang.String sID, java.lang.String sTemplateKey, SWTSkinObject tabHolder)
          Create a tab using a template.
protected static SWTSkin getDefaultInstance()
           
protected  org.eclipse.swt.widgets.Listener getHandCursorListener(org.eclipse.swt.widgets.Display display)
           
 ImageLoader getImageLoader(SkinProperties properties)
           
 org.eclipse.swt.widgets.Composite getShell()
           
 SWTSkinObject getSkinObject(java.lang.String sViewID)
           
 SWTSkinObject getSkinObject(java.lang.String sViewID, SWTSkinObject parent)
           
 SWTSkinObject getSkinObjectByID(java.lang.String sID)
           
 SWTSkinObject getSkinObjectByID(java.lang.String sID, SWTSkinObject parent)
           
 SWTSkinObjectListener[] getSkinObjectListeners(java.lang.String viewID)
           
 SWTSkinProperties getSkinProperties()
           
 SWTSkinTabSet getTabSet(java.lang.String sID)
           
 SWTSkinTabSet getTabSet(SWTSkinObject skinObject)
           
 void initialize(org.eclipse.swt.widgets.Composite skincomp, java.lang.String startID)
           
 void initialize(org.eclipse.swt.widgets.Composite skincomp, java.lang.String startID, IUIIntializer uiInitializer)
           
 boolean isAutoSizeOnLayout()
           
 boolean isCreatingSO()
           
 boolean isLayoutComplete()
           
 void layout()
           
 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]); } } }
static void main(java.lang.String[] args)
           
 void removeListener(java.lang.String viewID, SWTSkinObjectListener listener)
           
 void removeSkinObject(SWTSkinObject skinObject)
           
 boolean setActiveTab(java.lang.String sTabSetID, java.lang.String sTabViewID)
           
 void setAutoSizeOnLayout(boolean autoSizeOnLayout)
           
 void triggerLanguageChange()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG_VISIBILITIES

public static final boolean DEBUG_VISIBILITIES
See Also:
Constant Field Values

DEBUGLAYOUT

public boolean DEBUGLAYOUT
Constructor Detail

SWTSkin

protected SWTSkin()

SWTSkin

protected SWTSkin(java.lang.ClassLoader classLoader,
                  java.lang.String skinPath,
                  java.lang.String mainSkinFile)
Method Detail

getDefaultInstance

protected static SWTSkin getDefaultInstance()

getImageLoader

public ImageLoader getImageLoader(SkinProperties properties)

addToControlMap

public void addToControlMap(SWTSkinObject skinObject)

getSkinObjectByID

public SWTSkinObject getSkinObjectByID(java.lang.String sID)

getSkinObjectByID

public SWTSkinObject getSkinObjectByID(java.lang.String sID,
                                       SWTSkinObject parent)

getSkinObject

public SWTSkinObject getSkinObject(java.lang.String sViewID)

getSkinObject

public SWTSkinObject getSkinObject(java.lang.String sViewID,
                                   SWTSkinObject parent)

getTabSet

public SWTSkinTabSet getTabSet(java.lang.String sID)

activateTab

public SWTSkinObjectTab activateTab(SWTSkinObject skinObjectInTab)

getTabSet

public SWTSkinTabSet getTabSet(SWTSkinObject skinObject)

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)
Parameters:
shell2 -
string -
uiInitializer -
Since:
3.0.5.3

initialize

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

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()

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 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)

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

getSkinProperties

public SWTSkinProperties getSkinProperties()

addListener

public void addListener(java.lang.String viewID,
                        SWTSkinObjectListener listener)

removeListener

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

getSkinObjectListeners

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

isLayoutComplete

public boolean isLayoutComplete()

addListener

public void addListener(SWTSkinLayoutCompleteListener l)

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()