Package com.biglybt.ui.swt.skin
Class SWTSkinObjectBasic
java.lang.Object
com.biglybt.ui.swt.skin.SWTSkinObjectBasic
- All Implemented Interfaces:
ObfuscateImage
,PluginUISWTSkinObject
,SWTSkinObject
,EventListener
,org.eclipse.swt.events.PaintListener
,org.eclipse.swt.internal.SWTEventListener
- Direct Known Subclasses:
SWTSkinObjectBrowser
,SWTSkinObjectButton
,SWTSkinObjectCheckbox
,SWTSkinObjectCombo
,SWTSkinObjectContainer
,SWTSkinObjectImage
,SWTSkinObjectImage2
,SWTSkinObjectList
,SWTSkinObjectSash
,SWTSkinObjectSeparator
,SWTSkinObjectSlider
,SWTSkinObjectText1
,SWTSkinObjectText2
,SWTSkinObjectTextbox
,SWTSkinObjectToggle
public class SWTSkinObjectBasic
extends Object
implements SWTSkinObject, org.eclipse.swt.events.PaintListener, ObfuscateImage
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean
protected org.eclipse.swt.graphics.Color
private org.eclipse.swt.graphics.Image
protected static final int
protected static final int
protected static final int
private org.eclipse.swt.graphics.Color
private int[]
private int[]
private int
protected org.eclipse.swt.widgets.Control
protected boolean
private Object
protected boolean
private boolean
private boolean
(package private) boolean
private int
private boolean
protected ArrayList
<SWTSkinObjectListener> protected AEMonitor
private List
<SWTSkinObjectBasic.GradientInfo> private Map
private ObfuscateImage
protected SWTBGImagePainter
(package private) boolean
protected SWTSkinObject
protected SWTSkinProperties
private org.eclipse.swt.widgets.Listener
protected String
protected String
protected SWTSkin
private SkinView
protected String[]
private String
private String
protected String
-
Constructor Summary
ConstructorsConstructorDescriptionSWTSkinObjectBasic
(SWTSkin skin, SWTSkinProperties properties, String sID, String sConfigID, String type, SWTSkinObject parent) SWTSkinObjectBasic
(SWTSkin skin, SWTSkinProperties properties, org.eclipse.swt.widgets.Control control, String sID, String sConfigID, String type, SWTSkinObject parent) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(SWTSkinObjectListener listener) void
dispose()
boolean
private org.eclipse.swt.graphics.Color
Retrieve the Config ID which is ID in the skin config file.org.eclipse.swt.widgets.Control
Retrieve the associated SWT Control used by the skin objectboolean
private org.eclipse.swt.widgets.Listener
getSkin()
Retrieve the Skin Object ID that represents this object.getTooltipID
(boolean walkup) getType()
Retrieve the type of widget.boolean
boolean
isDebug()
boolean
boolean
void
org.eclipse.swt.graphics.Image
obfuscatedImage
(org.eclipse.swt.graphics.Image image) final void
paintControl
(org.eclipse.swt.events.PaintEvent e) void
paintControl
(org.eclipse.swt.graphics.GC gc) void
relayout()
void
removeListener
(SWTSkinObjectListener listener) void
setAlwaysHookPaintListener
(boolean alwaysHookPaintListener) void
setBackground
(String sConfigID, String sSuffix) void
setControl
(org.eclipse.swt.widgets.Control _control) void
void
setDebug
(boolean debug) void
protected boolean
setIsVisible
(boolean visible, boolean walkup) void
setObfuscatedImageGenerator
(ObfuscateImage obfuscatedImageGenerator) void
setProperties
(SWTSkinProperties skinProperties) void
setSkinView
(SkinView skinView) void
setTooltipID
(String id) protected void
void
setVisible
(boolean visible) switchSuffix
(String suffix) Switch the suffix using the default of1
for level andfalse
for walkUpfinal String
switchSuffix
(String suffix, int level, boolean walkUp) switchSuffix
(String newSuffixEntry, int level, boolean walkUp, boolean walkDown) toString()
void
triggerListeners
(int eventType) void
triggerListeners
(int eventType, Object params) private void
triggerListenersRaw
(int eventType, Object params)
-
Field Details
-
BORDER_ROUNDED
protected static final int BORDER_ROUNDED- See Also:
-
BORDER_ROUNDED_FILL
protected static final int BORDER_ROUNDED_FILL- See Also:
-
BORDER_GRADIENT
protected static final int BORDER_GRADIENT- See Also:
-
control
protected org.eclipse.swt.widgets.Control control -
type
-
sConfigID
-
painter
-
properties
-
sID
-
parent
-
skin
-
suffixes
-
listeners
-
listeners_mon
-
sViewID
-
isVisible
private int isVisible -
bgColor
protected org.eclipse.swt.graphics.Color bgColor -
colorBorder
private org.eclipse.swt.graphics.Color colorBorder -
colorBorderParams
private int[] colorBorderParams -
colorFillParams
private int[] colorFillParams -
colorFillType
private int colorFillType -
initialized
boolean initialized -
paintListenerHooked
boolean paintListenerHooked -
alwaysHookPaintListener
boolean alwaysHookPaintListener -
mapData
-
disposed
private boolean disposed -
debug
protected boolean debug -
listGradients
-
bgImage
private org.eclipse.swt.graphics.Image bgImage -
tooltipID
-
customTooltipID
protected boolean customTooltipID -
resizeGradientBGListener
private org.eclipse.swt.widgets.Listener resizeGradientBGListener -
skinView
-
datasource
-
firstVisibility
private boolean firstVisibility -
layoutComplete
private boolean layoutComplete -
obfuscatedImageGenerator
-
-
Constructor Details
-
SWTSkinObjectBasic
public SWTSkinObjectBasic(SWTSkin skin, SWTSkinProperties properties, org.eclipse.swt.widgets.Control control, String sID, String sConfigID, String type, SWTSkinObject parent) - Parameters:
properties
- TODO
-
SWTSkinObjectBasic
public SWTSkinObjectBasic(SWTSkin skin, SWTSkinProperties properties, String sID, String sConfigID, String type, SWTSkinObject parent)
-
-
Method Details
-
setControl
public void setControl(org.eclipse.swt.widgets.Control _control) -
getResizeGradientBGListener
private org.eclipse.swt.widgets.Listener getResizeGradientBGListener() -
setIsVisible
protected boolean setIsVisible(boolean visible, boolean walkup) - Parameters:
visible
-- Since:
- 3.0.4.3
-
getControl
public org.eclipse.swt.widgets.Control getControl()Description copied from interface:SWTSkinObject
Retrieve the associated SWT Control used by the skin object- Specified by:
getControl
in interfaceSWTSkinObject
- Returns:
- SWT Control
-
getType
Description copied from interface:SWTSkinObject
Retrieve the type of widget.- Specified by:
getType
in interfaceSWTSkinObject
- Returns:
- TODO Move widget types to SWTSkinObject
-
getConfigID
Description copied from interface:SWTSkinObject
Retrieve the Config ID which is ID in the skin config file.- Specified by:
getConfigID
in interfaceSWTSkinObject
- Returns:
- Config ID
-
getSkinObjectID
Description copied from interface:SWTSkinObject
Retrieve the Skin Object ID that represents this object. Typically the same asSWTSkinObject.getConfigID()
, however, may be different if a config id is used to make independant copies- Specified by:
getSkinObjectID
in interfaceSWTSkinObject
- Returns:
- An unique Skin Object ID
-
getParent
- Specified by:
getParent
in interfaceSWTSkinObject
-
setBackground
- Specified by:
setBackground
in interfaceSWTSkinObject
- Parameters:
sConfigID
-sSuffix
-
-
toString
-
getSkin
- Specified by:
getSkin
in interfaceSWTSkinObject
-
equals
-
setVisible
public void setVisible(boolean visible) - Specified by:
setVisible
in interfaceSWTSkinObject
-
setDefaultVisibility
public void setDefaultVisibility()- Specified by:
setDefaultVisibility
in interfaceSWTSkinObject
-
getDefaultVisibility
public boolean getDefaultVisibility()- Specified by:
getDefaultVisibility
in interfaceSWTSkinObject
- Returns:
-
isVisible
public boolean isVisible()- Specified by:
isVisible
in interfaceSWTSkinObject
-
switchSuffix
Switch the suffix using the default of1
for level andfalse
for walkUp- Specified by:
switchSuffix
in interfaceSWTSkinObject
- Parameters:
suffix
-- Returns:
-
switchSuffix
- Specified by:
switchSuffix
in interfaceSWTSkinObject
- Parameters:
suffix
-level
-walkUp
- TODO- Returns:
- TODO
-
switchSuffix
- Specified by:
switchSuffix
in interfaceSWTSkinObject
-
getSuffix
- Specified by:
getSuffix
in interfaceSWTSkinObject
- Returns:
-
getProperties
- Specified by:
getProperties
in interfaceSWTSkinObject
- Returns:
- the properties
-
setProperties
- Specified by:
setProperties
in interfaceSWTSkinObject
-
addListener
- Specified by:
addListener
in interfaceSWTSkinObject
-
removeListener
- Specified by:
removeListener
in interfaceSWTSkinObject
-
getListeners
- Specified by:
getListeners
in interfaceSWTSkinObject
- Returns:
-
triggerListeners
public void triggerListeners(int eventType) - Specified by:
triggerListeners
in interfaceSWTSkinObject
- Parameters:
eventType
-
-
triggerListeners
- Specified by:
triggerListeners
in interfaceSWTSkinObject
- Parameters:
eventType
-params
-
-
triggerListenersRaw
-
setViewID
-
getViewID
- Specified by:
getViewID
in interfaceSWTSkinObject
-
dispose
public void dispose()- Specified by:
dispose
in interfaceSWTSkinObject
-
isDisposed
public boolean isDisposed()- Specified by:
isDisposed
in interfaceSWTSkinObject
- Returns:
-
setTooltipID
- Specified by:
setTooltipID
in interfaceSWTSkinObject
- Parameters:
id
-
-
getTooltipID
- Specified by:
getTooltipID
in interfaceSWTSkinObject
- Parameters:
walkup
-- Returns:
-
paintControl
public void paintControl(org.eclipse.swt.graphics.GC gc) -
paintControl
public final void paintControl(org.eclipse.swt.events.PaintEvent e) - Specified by:
paintControl
in interfaceorg.eclipse.swt.events.PaintListener
-
isAlwaysHookPaintListener
public boolean isAlwaysHookPaintListener() -
setAlwaysHookPaintListener
public void setAlwaysHookPaintListener(boolean alwaysHookPaintListener) -
getData
- Specified by:
getData
in interfaceSWTSkinObject
-
setData
- Specified by:
setData
in interfaceSWTSkinObject
-
obfuscatedImage
public org.eclipse.swt.graphics.Image obfuscatedImage(org.eclipse.swt.graphics.Image image) - Specified by:
obfuscatedImage
in interfaceObfuscateImage
-
setObfuscatedImageGenerator
- Specified by:
setObfuscatedImageGenerator
in interfaceSWTSkinObject
-
setDebug
public void setDebug(boolean debug) - Specified by:
setDebug
in interfaceSWTSkinObject
- Parameters:
debug
- the debug to set
-
isDebug
public boolean isDebug()- Specified by:
isDebug
in interfaceSWTSkinObject
- Returns:
- the debug
-
relayout
public void relayout()- Specified by:
relayout
in interfaceSWTSkinObject
-
layoutComplete
public void layoutComplete()- Specified by:
layoutComplete
in interfaceSWTSkinObject
-
getColor_SuffixWalkback
-
getSkinView
- Specified by:
getSkinView
in interfaceSWTSkinObject
-
setSkinView
- Specified by:
setSkinView
in interfaceSWTSkinObject
-