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

java.lang.Object
  extended by com.aelitis.azureus.ui.swt.skin.SWTSkinObjectBasic
All Implemented Interfaces:
SWTSkinObject, EventListener, org.eclipse.swt.events.PaintListener, org.eclipse.swt.internal.SWTEventListener, ObfusticateImage, PluginUISWTSkinObject
Direct Known Subclasses:
SWTSkinObjectBrowser, SWTSkinObjectButton, SWTSkinObjectCheckbox, SWTSkinObjectCombo, SWTSkinObjectContainer, SWTSkinObjectImage, SWTSkinObjectImage2, SWTSkinObjectSash, SWTSkinObjectSeparator, SWTSkinObjectSlider, SWTSkinObjectText1, SWTSkinObjectText2, SWTSkinObjectTextbox, SWTSkinObjectToggle

public class SWTSkinObjectBasic
extends Object
implements SWTSkinObject, org.eclipse.swt.events.PaintListener, ObfusticateImage

Author:
TuxPaper

Field Summary
protected  org.eclipse.swt.graphics.Color bgColor
           
protected static int BORDER_GRADIENT
           
protected static int BORDER_ROUNDED
           
protected static int BORDER_ROUNDED_FILL
           
protected  org.eclipse.swt.widgets.Control control
           
protected  boolean customTooltipID
           
protected  boolean debug
           
protected  ArrayList<SWTSkinObjectListener> listeners
           
protected  AEMonitor listeners_mon
           
protected  SWTBGImagePainter painter
           
protected  SWTSkinObject parent
           
protected  SWTSkinProperties properties
           
protected  String sConfigID
           
protected  String sID
           
protected  SWTSkin skin
           
protected  String[] suffixes
           
protected  String type
           
 
Constructor Summary
SWTSkinObjectBasic(SWTSkin skin, SWTSkinProperties properties, org.eclipse.swt.widgets.Control control, String sID, String sConfigID, String type, SWTSkinObject parent)
           
SWTSkinObjectBasic(SWTSkin skin, SWTSkinProperties properties, String sID, String sConfigID, String type, SWTSkinObject parent)
           
 
Method Summary
 void addListener(SWTSkinObjectListener listener)
           
 void dispose()
           
 boolean equals(Object obj)
           
 String getConfigID()
          Retrieve the Config ID which is ID in the skin config file.
 org.eclipse.swt.widgets.Control getControl()
          Retrieve the associated SWT Control used by the skin object
 Object getData(String id)
           
 boolean getDefaultVisibility()
           
 SWTSkinObjectListener[] getListeners()
           
 SWTSkinObject getParent()
           
 SWTSkinProperties getProperties()
           
 SWTSkin getSkin()
           
 String getSkinObjectID()
          Retrieve the Skin Object ID that represents this object.
 SkinView getSkinView()
           
 String getSuffix()
           
 String getTooltipID(boolean walkup)
           
 String getType()
          Retrieve the type of widget.
 String getViewID()
           
 int hashCode()
           
 boolean isAlwaysHookPaintListener()
           
 boolean isDebug()
           
 boolean isDisposed()
           
 boolean isVisible()
           
 void layoutComplete()
           
 org.eclipse.swt.graphics.Image obfusticatedImage(org.eclipse.swt.graphics.Image image)
           
 void paintControl(org.eclipse.swt.graphics.GC gc)
           
 void paintControl(org.eclipse.swt.events.PaintEvent e)
           
 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 setData(String id, Object data)
           
 void setDebug(boolean debug)
           
 void setDefaultVisibility()
           
protected  boolean setIsVisible(boolean visible, boolean walkup)
           
 void setObfusticatedImageGenerator(ObfusticateImage obfusticatedImageGenerator)
           
 void setProperties(SWTSkinProperties skinProperties)
           
 void setSkinView(SkinView skinView)
           
 void setTooltipID(String id)
           
protected  void setViewID(String viewID)
           
 void setVisible(boolean visible)
           
 String switchSuffix(String suffix)
          Switch the suffix using the default of 1 for level and false for walkUp
 String switchSuffix(String suffix, int level, boolean walkUp)
           
 String switchSuffix(String newSuffixEntry, int level, boolean walkUp, boolean walkDown)
           
 String toString()
           
 void triggerListeners(int eventType)
           
 void triggerListeners(int eventType, Object params)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BORDER_ROUNDED

protected static final int BORDER_ROUNDED
See Also:
Constant Field Values

BORDER_ROUNDED_FILL

protected static final int BORDER_ROUNDED_FILL
See Also:
Constant Field Values

BORDER_GRADIENT

protected static final int BORDER_GRADIENT
See Also:
Constant Field Values

control

protected org.eclipse.swt.widgets.Control control

type

protected String type

sConfigID

protected String sConfigID

painter

protected SWTBGImagePainter painter

properties

protected SWTSkinProperties properties

sID

protected String sID

parent

protected SWTSkinObject parent

skin

protected SWTSkin skin

suffixes

protected String[] suffixes

listeners

protected ArrayList<SWTSkinObjectListener> listeners

listeners_mon

protected AEMonitor listeners_mon

bgColor

protected org.eclipse.swt.graphics.Color bgColor

debug

protected boolean debug

customTooltipID

protected boolean customTooltipID
Constructor Detail

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 Detail

setControl

public void setControl(org.eclipse.swt.widgets.Control _control)

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 interface SWTSkinObject
Returns:
SWT Control

getType

public String getType()
Description copied from interface: SWTSkinObject
Retrieve the type of widget.

Specified by:
getType in interface SWTSkinObject
Returns:
TODO Move widget types to SWTSkinObject

getConfigID

public String getConfigID()
Description copied from interface: SWTSkinObject
Retrieve the Config ID which is ID in the skin config file.

Specified by:
getConfigID in interface SWTSkinObject
Returns:
Config ID

getSkinObjectID

public String getSkinObjectID()
Description copied from interface: SWTSkinObject
Retrieve the Skin Object ID that represents this object. Typically the same as SWTSkinObject.getConfigID(), however, may be different if a config id is used to make independant copies

Specified by:
getSkinObjectID in interface SWTSkinObject
Returns:
An unique Skin Object ID

getParent

public SWTSkinObject getParent()
Specified by:
getParent in interface SWTSkinObject

setBackground

public void setBackground(String sConfigID,
                          String sSuffix)
Specified by:
setBackground in interface SWTSkinObject

toString

public String toString()
Overrides:
toString in class Object

getSkin

public SWTSkin getSkin()
Specified by:
getSkin in interface SWTSkinObject

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

setVisible

public void setVisible(boolean visible)
Specified by:
setVisible in interface SWTSkinObject

setDefaultVisibility

public void setDefaultVisibility()
Specified by:
setDefaultVisibility in interface SWTSkinObject

getDefaultVisibility

public boolean getDefaultVisibility()
Specified by:
getDefaultVisibility in interface SWTSkinObject
Returns:

isVisible

public boolean isVisible()
Specified by:
isVisible in interface SWTSkinObject

switchSuffix

public String switchSuffix(String suffix)
Switch the suffix using the default of 1 for level and false for walkUp

Specified by:
switchSuffix in interface SWTSkinObject
Returns:

switchSuffix

public final String switchSuffix(String suffix,
                                 int level,
                                 boolean walkUp)
Specified by:
switchSuffix in interface SWTSkinObject
walkUp - TODO
Returns:
TODO

switchSuffix

public String switchSuffix(String newSuffixEntry,
                           int level,
                           boolean walkUp,
                           boolean walkDown)
Specified by:
switchSuffix in interface SWTSkinObject

getSuffix

public String getSuffix()
Specified by:
getSuffix in interface SWTSkinObject
Returns:

getProperties

public SWTSkinProperties getProperties()
Specified by:
getProperties in interface SWTSkinObject
Returns:
the properties

setProperties

public void setProperties(SWTSkinProperties skinProperties)
Specified by:
setProperties in interface SWTSkinObject

addListener

public void addListener(SWTSkinObjectListener listener)
Specified by:
addListener in interface SWTSkinObject

removeListener

public void removeListener(SWTSkinObjectListener listener)
Specified by:
removeListener in interface SWTSkinObject

getListeners

public SWTSkinObjectListener[] getListeners()
Specified by:
getListeners in interface SWTSkinObject
Returns:

triggerListeners

public void triggerListeners(int eventType)
Specified by:
triggerListeners in interface SWTSkinObject

triggerListeners

public void triggerListeners(int eventType,
                             Object params)
Specified by:
triggerListeners in interface SWTSkinObject

setViewID

protected void setViewID(String viewID)

getViewID

public String getViewID()
Specified by:
getViewID in interface SWTSkinObject

dispose

public void dispose()
Specified by:
dispose in interface SWTSkinObject

isDisposed

public boolean isDisposed()
Specified by:
isDisposed in interface SWTSkinObject
Returns:

setTooltipID

public void setTooltipID(String id)
Specified by:
setTooltipID in interface SWTSkinObject

getTooltipID

public String getTooltipID(boolean walkup)
Specified by:
getTooltipID in interface SWTSkinObject
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 interface org.eclipse.swt.events.PaintListener

isAlwaysHookPaintListener

public boolean isAlwaysHookPaintListener()

setAlwaysHookPaintListener

public void setAlwaysHookPaintListener(boolean alwaysHookPaintListener)

getData

public Object getData(String id)
Specified by:
getData in interface SWTSkinObject

setData

public void setData(String id,
                    Object data)
Specified by:
setData in interface SWTSkinObject

obfusticatedImage

public org.eclipse.swt.graphics.Image obfusticatedImage(org.eclipse.swt.graphics.Image image)
Specified by:
obfusticatedImage in interface ObfusticateImage

setObfusticatedImageGenerator

public void setObfusticatedImageGenerator(ObfusticateImage obfusticatedImageGenerator)
Specified by:
setObfusticatedImageGenerator in interface SWTSkinObject

setDebug

public void setDebug(boolean debug)
Specified by:
setDebug in interface SWTSkinObject
Parameters:
debug - the debug to set

isDebug

public boolean isDebug()
Specified by:
isDebug in interface SWTSkinObject
Returns:
the debug

relayout

public void relayout()
Specified by:
relayout in interface SWTSkinObject

layoutComplete

public void layoutComplete()
Specified by:
layoutComplete in interface SWTSkinObject

getSkinView

public SkinView getSkinView()
Specified by:
getSkinView in interface SWTSkinObject

setSkinView

public void setSkinView(SkinView skinView)
Specified by:
setSkinView in interface SWTSkinObject