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

java.lang.Object
  extended by com.aelitis.azureus.ui.swt.skin.SWTSkinObjectBasic
All Implemented Interfaces:
SWTSkinObject, java.util.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 java.lang.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  java.util.ArrayList<SWTSkinObjectListener> listeners
           
protected  AEMonitor listeners_mon
           
protected  SWTBGImagePainter painter
           
protected  SWTSkinObject parent
           
protected  SWTSkinProperties properties
           
protected  java.lang.String sConfigID
           
protected  java.lang.String sID
           
protected  SWTSkin skin
           
protected  java.lang.String[] suffixes
           
protected  java.lang.String type
           
 
Constructor Summary
SWTSkinObjectBasic(SWTSkin skin, SWTSkinProperties properties, org.eclipse.swt.widgets.Control control, java.lang.String sID, java.lang.String sConfigID, java.lang.String type, SWTSkinObject parent)
           
SWTSkinObjectBasic(SWTSkin skin, SWTSkinProperties properties, java.lang.String sID, java.lang.String sConfigID, java.lang.String type, SWTSkinObject parent)
           
 
Method Summary
 void addListener(SWTSkinObjectListener listener)
           
 void dispose()
           
 boolean equals(java.lang.Object obj)
           
 java.lang.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
 java.lang.Object getData(java.lang.String id)
           
 boolean getDefaultVisibility()
           
 SWTSkinObjectListener[] getListeners()
           
 SWTSkinObject getParent()
           
 SWTSkinProperties getProperties()
           
 SWTSkin getSkin()
           
 java.lang.String getSkinObjectID()
          Retrieve the Skin Object ID that represents this object.
 SkinView getSkinView()
           
 java.lang.String getSuffix()
           
 java.lang.String getTooltipID(boolean walkup)
           
 java.lang.String getType()
          Retrieve the type of widget.
 java.lang.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(java.lang.String sConfigID, java.lang.String sSuffix)
           
 void setControl(org.eclipse.swt.widgets.Control _control)
           
 void setData(java.lang.String id, java.lang.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(java.lang.String id)
           
protected  void setViewID(java.lang.String viewID)
           
 void setVisible(boolean visible)
           
 java.lang.String switchSuffix(java.lang.String suffix)
          Switch the suffix using the default of 1 for level and false for walkUp
 java.lang.String switchSuffix(java.lang.String suffix, int level, boolean walkUp)
           
 java.lang.String switchSuffix(java.lang.String newSuffixEntry, int level, boolean walkUp, boolean walkDown)
           
 java.lang.String toString()
           
 void triggerListeners(int eventType)
           
 void triggerListeners(int eventType, java.lang.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 java.lang.String type

sConfigID

protected java.lang.String sConfigID

painter

protected SWTBGImagePainter painter

properties

protected SWTSkinProperties properties

sID

protected java.lang.String sID

parent

protected SWTSkinObject parent

skin

protected SWTSkin skin

suffixes

protected java.lang.String[] suffixes

listeners

protected java.util.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,
                          java.lang.String sID,
                          java.lang.String sConfigID,
                          java.lang.String type,
                          SWTSkinObject parent)
Parameters:
properties - TODO

SWTSkinObjectBasic

public SWTSkinObjectBasic(SWTSkin skin,
                          SWTSkinProperties properties,
                          java.lang.String sID,
                          java.lang.String sConfigID,
                          java.lang.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 java.lang.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 java.lang.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 java.lang.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(java.lang.String sConfigID,
                          java.lang.String sSuffix)
Specified by:
setBackground in interface SWTSkinObject

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getSkin

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.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 java.lang.String switchSuffix(java.lang.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 java.lang.String switchSuffix(java.lang.String suffix,
                                           int level,
                                           boolean walkUp)
Specified by:
switchSuffix in interface SWTSkinObject
walkUp - TODO
Returns:
TODO

switchSuffix

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

getSuffix

public java.lang.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,
                             java.lang.Object params)
Specified by:
triggerListeners in interface SWTSkinObject

setViewID

protected void setViewID(java.lang.String viewID)

getViewID

public java.lang.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(java.lang.String id)
Specified by:
setTooltipID in interface SWTSkinObject

getTooltipID

public java.lang.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 java.lang.Object getData(java.lang.String id)
Specified by:
getData in interface SWTSkinObject

setData

public void setData(java.lang.String id,
                    java.lang.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