tabs
Class TabGuiUtility

java.lang.Object
  extended by tabs.TabGuiUtility

public class TabGuiUtility
extends java.lang.Object

Instances of this class provide methods that can be used to help a tab drawing it's GUI


Constructor Summary
TabGuiUtility(org.eclipse.swt.widgets.Composite composite)
          Creates a new instance of the current class given the composite used for drawings
 
Method Summary
 void createBottomComposite()
          This method initializes bottomComposite
 java.util.ArrayList<ColorButton> createColorButtonsComposite(org.eclipse.swt.graphics.Color[] colorsList)
          Create the color buttons composite
 void createUpperComposite(java.lang.String labelText)
          Create the upper composite of a tab which contains the tab's title
 org.eclipse.swt.widgets.Scale getAlphaScale()
          Returns the current opacity scale value
 java.awt.Color getCurrentColor()
          Returns the current selected color in AWT format
 ColorButton getSelectedButton()
          Returns the current selected colored button
 org.eclipse.swt.widgets.Scale getStrokeScale()
          Returns the current size scale value
 void setSelectedColorButton(ColorButton cb)
          Select a given colored button
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabGuiUtility

public TabGuiUtility(org.eclipse.swt.widgets.Composite composite)
Creates a new instance of the current class given the composite used for drawings

Parameters:
composite -
Method Detail

createUpperComposite

public void createUpperComposite(java.lang.String labelText)
Create the upper composite of a tab which contains the tab's title

Parameters:
labelText - tab's title

createColorButtonsComposite

public java.util.ArrayList<ColorButton> createColorButtonsComposite(org.eclipse.swt.graphics.Color[] colorsList)
Create the color buttons composite

Parameters:
colorsList - the list of colors to create the color buttons (one for each color)
Returns:
the new created list of ColorButton's

getCurrentColor

public java.awt.Color getCurrentColor()
Returns the current selected color in AWT format

Returns:
the current selected color in AWT format

createBottomComposite

public void createBottomComposite()
This method initializes bottomComposite


getStrokeScale

public org.eclipse.swt.widgets.Scale getStrokeScale()
Returns the current size scale value

Returns:
the current size scale value

getAlphaScale

public org.eclipse.swt.widgets.Scale getAlphaScale()
Returns the current opacity scale value

Returns:
the current opacity scale value

setSelectedColorButton

public void setSelectedColorButton(ColorButton cb)
Select a given colored button

Parameters:
cb - the ColorButton to be selected

getSelectedButton

public ColorButton getSelectedButton()
Returns the current selected colored button

Returns:
the current selected colored button