com.aelitis.azureus.ui.swt.skin
Class SWTSkin
java.lang.Object
com.aelitis.azureus.ui.swt.skin.SWTSkin
public class SWTSkin
- extends Object
- Author:
- TuxPaper
Method Summary |
SWTSkinObjectTab |
activateTab(SWTSkinObject skinObjectInTab)
|
void |
addListener(String viewID,
SWTSkinObjectListener listener)
|
void |
addListener(SWTSkinLayoutCompleteListener l)
|
void |
addSkinObject(SWTSkinObject skinObject)
|
void |
addToControlMap(SWTSkinObject skinObject)
|
SWTSkinObject |
createSkinObject(String sID,
String sConfigID,
SWTSkinObject parentSkinObject)
|
SWTSkinObject |
createSkinObject(String sID,
String sConfigID,
SWTSkinObject parentSkinObject,
Object datasource)
Create a skin object based off an existing config "template" |
SWTSkinObjectTab |
createTab(String sID,
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(String sViewID)
|
SWTSkinObject |
getSkinObject(String sViewID,
SWTSkinObject parent)
|
SWTSkinObject |
getSkinObjectByID(String sID)
|
SWTSkinObject |
getSkinObjectByID(String sID,
SWTSkinObject parent)
|
SWTSkinObjectListener[] |
getSkinObjectListeners(String viewID)
|
SWTSkinProperties |
getSkinProperties()
|
SWTSkinTabSet |
getTabSet(String sID)
|
SWTSkinTabSet |
getTabSet(SWTSkinObject skinObject)
|
void |
initialize(org.eclipse.swt.widgets.Composite skincomp,
String startID)
|
void |
initialize(org.eclipse.swt.widgets.Composite skincomp,
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(String[] args)
|
void |
removeListener(String viewID,
SWTSkinObjectListener listener)
|
void |
removeSkinObject(SWTSkinObject skinObject)
|
boolean |
setActiveTab(String sTabSetID,
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 |
DEBUG_VISIBILITIES
public static final boolean DEBUG_VISIBILITIES
- See Also:
- Constant Field Values
DEBUGLAYOUT
public boolean DEBUGLAYOUT
SWTSkin
protected SWTSkin()
SWTSkin
protected SWTSkin(ClassLoader classLoader,
String skinPath,
String mainSkinFile)
getDefaultInstance
protected static SWTSkin getDefaultInstance()
getImageLoader
public ImageLoader getImageLoader(SkinProperties properties)
addToControlMap
public void addToControlMap(SWTSkinObject skinObject)
getSkinObjectByID
public SWTSkinObject getSkinObjectByID(String sID)
getSkinObjectByID
public SWTSkinObject getSkinObjectByID(String sID,
SWTSkinObject parent)
getSkinObject
public SWTSkinObject getSkinObject(String sViewID)
getSkinObject
public SWTSkinObject getSkinObject(String sViewID,
SWTSkinObject parent)
getTabSet
public SWTSkinTabSet getTabSet(String sID)
activateTab
public SWTSkinObjectTab activateTab(SWTSkinObject skinObjectInTab)
getTabSet
public SWTSkinTabSet getTabSet(SWTSkinObject skinObject)
setActiveTab
public boolean setActiveTab(String sTabSetID,
String sTabViewID)
initialize
public void initialize(org.eclipse.swt.widgets.Composite skincomp,
String startID)
- Parameters:
shell2
- string
- uiInitializer
- - Since:
- 3.0.5.3
initialize
public void initialize(org.eclipse.swt.widgets.Composite skincomp,
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(String sID,
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 tabsTemplateKey
- Template Key to read to get the tab's template skin objecttabHolder
- 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(String sID,
String sConfigID,
SWTSkinObject parentSkinObject)
createSkinObject
public SWTSkinObject createSkinObject(String sID,
String sConfigID,
SWTSkinObject parentSkinObject,
Object datasource)
- Create a skin object based off an existing config "template"
- Parameters:
sID
- ID of new skin objectsConfigID
- config id to use to create new skin objectparentSkinObject
- 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(String viewID,
SWTSkinObjectListener listener)
removeListener
public void removeListener(String viewID,
SWTSkinObjectListener listener)
getSkinObjectListeners
public SWTSkinObjectListener[] getSkinObjectListeners(String viewID)
isLayoutComplete
public boolean isLayoutComplete()
addListener
public void addListener(SWTSkinLayoutCompleteListener l)
main
public static void main(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()