Package com.biglybt.ui.swt.skin
Class SWTSkin
java.lang.Object
com.biglybt.ui.swt.skin.SWTSkin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
private boolean
private org.eclipse.swt.graphics.Cursor
private int
private int
static final boolean
boolean
private static SWTSkin
private static org.eclipse.swt.graphics.Cursor
private static org.eclipse.swt.widgets.Listener
private final boolean
private HashMap
<String, SWTSkinObject[]> private Map
<SkinProperties, ImageLoader> private HashMap
<String, ArrayList<SWTSkinObjectListener>> private AEMonitor
private HashMap
<String, SWTSkinObject[]> private HashMap
<String, SWTSkinTabSet> private AEMonitor
private AEMonitor
private static final SWTSkinObjectListener[]
private ArrayList
<SWTSkinObjectBasic> private org.eclipse.swt.widgets.Composite
private final SWTSkinProperties
private String
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SWTSkin()
private
SWTSkin
(SWTSkinProperties skinProperties, boolean is_default) protected
SWTSkin
(ClassLoader classLoader, String skinPath, String mainSkinFile) -
Method Summary
Modifier and TypeMethodDescriptionprivate SWTSkinObjectTab
_createTab
(SWTSkinProperties properties, String sID, String sConfigID, SWTSkinObject parentSkinObject) activateTab
(SWTSkinObject skinObjectInTab) private void
addContainerChildren
(SWTSkinObject skinObject, String[] sItems, SWTSkinProperties properties) void
void
addListener
(String viewID, SWTSkinObjectListener listener) void
addSkinObject
(SWTSkinObject skinObject) void
addToControlMap
(SWTSkinObject skinObject) private void
addToSOArrayMap
(Map<String, SWTSkinObject[]> arrayMap, AEMonitor mon, String key, SWTSkinObject object) (package private) void
attachControl
(SWTSkinObject skinObject) void
void
private SWTSkinObject
createBrowser
(SWTSkinProperties properties, String sID, String sConfigID, SWTSkinObject parentSkinObject) private SWTSkinObject
createButton
(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) private SWTSkinObject
createCheckbox
(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) private SWTSkinObject
createClone
(SWTSkinProperties properties, String sID, String sConfigID, String[] typeParams, SWTSkinObject parentSkinObject) private SWTSkinObject
createCombo
(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) private SWTSkinObject
createContainer
(SWTSkinProperties properties, String sID, String sConfigID, String[] sTypeParams, SWTSkinObject parentSkinObject, boolean bForceCreate, boolean bPropogate, SWTSkinObject intoSkinObject) private SWTSkinObject
createContainer2
(SWTSkinProperties properties, String sID, String sConfigID, SWTSkinObject parentSkinObject, boolean bForceCreate, boolean bPropogate, SWTSkinObject intoSkinObject) private SWTSkinObject
createExpandBar
(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) private SWTSkinObject
createExpandItem
(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) private SWTSkinObject
createImageLabel
(SWTSkinProperties properties, String sID, String sConfigID, String[] typeParams, SWTSkinObject parentSkinObject) private SWTSkinObject
createImageLabel2
(SWTSkinProperties properties, String sConfigID, SWTSkinObject parentSkinObject) private SWTSkinObject
createList
(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) private SWTSkinObject
createMySash
(SWTSkinProperties properties, String sID, String sConfigID, String[] typeParams, SWTSkinObject parentSkinObject, boolean bVertical) private SWTSkinObject
createSash
(SWTSkinProperties properties, String sID, String sConfigID, SWTSkinObject parentSkinObject, boolean bVertical) private SWTSkinObject
createSeparator
(SWTSkinProperties properties, String sID, String sConfigID, String[] typeParams, SWTSkinObject parentSkinObject) createSkinObject
(String sID, String sConfigID, SWTSkinObject parentSkinObject) createSkinObject
(String sID, String sConfigID, SWTSkinObject parentSkinObject, Object datasource) Create a skin object based off an existing config "template"private SWTSkinObject
createSlider
(SWTSkinProperties properties, String sID, String sConfigID, String[] typeParams, SWTSkinObject parentSkinObject) createTab
(String sID, String sTemplateKey, SWTSkinObject tabHolder) Create a tab using a template.private SWTSkinObject
createTabFolder
(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) private SWTSkinObject
createTextbox
(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) private SWTSkinObject
createTextLabel
(SWTSkinProperties properties, String sID, String sConfigID, String[] typeParams, SWTSkinObject parentSkinObject) private SWTSkinObject
createToggle
(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) private SWTSkinObject
createUnattachedView
(String viewID, SWTSkinObject parent) static void
private void
protected static SWTSkin
private Object
getFromSOArrayMap
(Map<String, SWTSkinObject[]> arrayMap, Object key, SWTSkinObject parent) protected static org.eclipse.swt.widgets.Listener
getHandCursorListener
(org.eclipse.swt.widgets.Display display) getImageLoader
(SkinProperties properties) org.eclipse.swt.widgets.Composite
getShell()
getSkinObject
(String sViewID) getSkinObject
(String sViewID, SWTSkinObject parent) getSkinObjectByID
(String sID) getSkinObjectByID
(String sID, SWTSkinObject parent) getSkinObjectListeners
(String viewID) getTabSet
(SWTSkinObject skinObject) private boolean
hasSkinObject
(SWTSkinObject start, 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
boolean
boolean
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 invalid input: '<' children.length; i++) { addPaintListenerToAll(children[i]); } } }private SWTSkinObject
linkIDtoParent
(SWTSkinProperties properties, String sID, String sConfigID, SWTSkinObject parentSkinObject, boolean bForceCreate, boolean bAddView, Object datasource) static void
void
removeListener
(String viewID, SWTSkinObjectListener listener) void
removeSkinObject
(SWTSkinObject skinObject) boolean
setActiveTab
(String sTabSetID, String sTabViewID) void
setAutoSizeOnLayout
(boolean autoSizeOnLayout, boolean force) private void
setSkinObjectViewID
(SWTSkinObject skinObject, String sViewID) void
-
Field Details
-
DEBUG_VISIBILITIES
public static final boolean DEBUG_VISIBILITIES- See Also:
-
NOLISTENERS
-
default_instance
-
DEBUGLAYOUT
public boolean DEBUGLAYOUT -
mapImageLoaders
-
skinProperties
-
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
-
mon_MapIDsToSOs
-
mapTabSetToControls
-
mapPublicViewIDsToSOs
-
mon_mapPublicViewIDsToSOs
-
mapPublicViewIDsToListeners
-
mapPublicViewIDsToListeners_mon
-
ontopImages
-
skinComposite
private org.eclipse.swt.widgets.Composite skinComposite -
bLayoutComplete
private boolean bLayoutComplete -
listenersLayoutComplete
-
currentSkinObjectcreationCount
private int currentSkinObjectcreationCount -
startID
-
autoSizeOnLayout
private boolean autoSizeOnLayout -
autoSizeOnLayoutForce
private boolean autoSizeOnLayoutForce -
constructionDepth
private int constructionDepth -
constructionCursor
private org.eclipse.swt.graphics.Cursor constructionCursor
-
-
Constructor Details
-
SWTSkin
protected SWTSkin() -
SWTSkin
-
SWTSkin
-
-
Method Details
-
getDefaultInstance
-
getSkinID
-
getImageLoader
-
addToControlMap
-
addToSOArrayMap
private void addToSOArrayMap(Map<String, SWTSkinObject[]> arrayMap, AEMonitor mon, String key, SWTSkinObject object) -
getFromSOArrayMap
private Object getFromSOArrayMap(Map<String, SWTSkinObject[]> arrayMap, Object key, SWTSkinObject parent) -
setSkinObjectViewID
-
getSkinObjectByID
-
getSkinObjectByID
-
getSkinObject
-
createUnattachedView
- Parameters:
viewID
-- Returns:
- Since:
- 3.1.1.1
-
getSkinObject
-
getTabSet
-
activateTab
-
hasSkinObject
-
getTabSet
-
setActiveTab
-
initialize
- Since:
- 3.0.5.3
-
initialize
public void initialize(org.eclipse.swt.widgets.Composite skincomp, String startID, IUIIntializer uiInitializer) -
disposeSkin
private void disposeSkin()- Since:
- 4.0.0.5
-
layout
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 invalid input: '<' children.length; i++) { addPaintListenerToAll(children[i]); } } } -
layout
public void layout() -
attachControl
-
createContainer
private SWTSkinObject createContainer(SWTSkinProperties properties, String sID, String sConfigID, String[] sTypeParams, SWTSkinObject parentSkinObject, boolean bForceCreate, boolean bPropogate, SWTSkinObject intoSkinObject) -
addContainerChildren
private void addContainerChildren(SWTSkinObject skinObject, String[] sItems, SWTSkinProperties properties) -
createSash
private SWTSkinObject createSash(SWTSkinProperties properties, String sID, String sConfigID, SWTSkinObject parentSkinObject, boolean bVertical) -
createMySash
private SWTSkinObject createMySash(SWTSkinProperties properties, String sID, String sConfigID, String[] typeParams, SWTSkinObject parentSkinObject, boolean bVertical) -
createTab
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
-
_createTab
private SWTSkinObjectTab _createTab(SWTSkinProperties properties, String sID, String sConfigID, SWTSkinObject parentSkinObject) -
createTextLabel
private SWTSkinObject createTextLabel(SWTSkinProperties properties, String sID, String sConfigID, String[] typeParams, SWTSkinObject parentSkinObject) -
createSlider
private SWTSkinObject createSlider(SWTSkinProperties properties, String sID, String sConfigID, String[] typeParams, SWTSkinObject parentSkinObject) -
getShell
public org.eclipse.swt.widgets.Composite getShell() -
getHandCursorListener
protected static org.eclipse.swt.widgets.Listener getHandCursorListener(org.eclipse.swt.widgets.Display display) -
createSkinObject
-
constructionStart
public void constructionStart() -
constructionEnd
public void constructionEnd() -
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
-
removeSkinObject
- Parameters:
skinObject
-- Since:
- 3.0.1.3
-
linkIDtoParent
private SWTSkinObject linkIDtoParent(SWTSkinProperties properties, String sID, String sConfigID, SWTSkinObject parentSkinObject, boolean bForceCreate, boolean bAddView, Object datasource) -
createButton
private SWTSkinObject createButton(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) - Parameters:
properties
-id
-configID
-typeParams
-parentSkinObject
-- Returns:
- Since:
- 3.1.1.1
-
createCheckbox
private SWTSkinObject createCheckbox(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) -
createToggle
private SWTSkinObject createToggle(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) -
createExpandBar
private SWTSkinObject createExpandBar(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) -
createExpandItem
private SWTSkinObject createExpandItem(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) -
createTextbox
private SWTSkinObject createTextbox(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) -
createCombo
private SWTSkinObject createCombo(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) -
createList
private SWTSkinObject createList(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) -
createTabFolder
private SWTSkinObject createTabFolder(SWTSkinProperties properties, String id, String configID, String[] typeParams, SWTSkinObject parentSkinObject) -
createBrowser
private SWTSkinObject createBrowser(SWTSkinProperties properties, String sID, String sConfigID, SWTSkinObject parentSkinObject) - Parameters:
properties
-sID
-sConfigID
-parentSkinObject
-- Returns:
-
createClone
private SWTSkinObject createClone(SWTSkinProperties properties, String sID, String sConfigID, String[] typeParams, SWTSkinObject parentSkinObject) -
createImageLabel
private SWTSkinObject createImageLabel(SWTSkinProperties properties, String sID, String sConfigID, String[] typeParams, SWTSkinObject parentSkinObject) -
createContainer2
private SWTSkinObject createContainer2(SWTSkinProperties properties, String sID, String sConfigID, SWTSkinObject parentSkinObject, boolean bForceCreate, boolean bPropogate, SWTSkinObject intoSkinObject) -
createImageLabel2
private SWTSkinObject createImageLabel2(SWTSkinProperties properties, String sConfigID, SWTSkinObject parentSkinObject) -
createSeparator
private SWTSkinObject createSeparator(SWTSkinProperties properties, String sID, String sConfigID, String[] typeParams, SWTSkinObject parentSkinObject) -
getSkinProperties
-
addListener
-
removeListener
-
getSkinObjectListeners
-
isLayoutComplete
public boolean isLayoutComplete() -
addListener
-
main
-
isCreatingSO
public boolean isCreatingSO() -
triggerLanguageChange
public void triggerLanguageChange()- Since:
- 3.1.1.1
-
setAutoSizeOnLayout
public void setAutoSizeOnLayout(boolean autoSizeOnLayout, boolean force) -
isAutoSizeOnLayout
public boolean isAutoSizeOnLayout() -
disposeDefault
public static void disposeDefault()
-