tabs
Class TabContainer

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Control
          extended by org.eclipse.swt.widgets.Scrollable
              extended by org.eclipse.swt.widgets.Composite
                  extended by tabs.TabContainer
All Implemented Interfaces:
java.lang.Comparable<TabContainer>, org.eclipse.swt.graphics.Drawable
Direct Known Subclasses:
BlushTab, ConcealerTab, FreeDrawTab, HairTab, LensTab, LipsTab, ShadowTab

public abstract class TabContainer
extends org.eclipse.swt.widgets.Composite
implements java.lang.Comparable<TabContainer>

Abstract class that represents a tab on the TabsContainer


Field Summary
protected  TabsContainer tabsContainer
          The parent of this tab is TabsContainer
 
Fields inherited from class org.eclipse.swt.widgets.Composite
embeddedHandle
 
Fields inherited from class org.eclipse.swt.widgets.Widget
handle
 
Constructor Summary
TabContainer(TabsContainer parent, int style, int tabLayerPosition)
          Default constructor for TabContainer Note: setTabImage and setTabTooltipText should be called when the new tab is constructed.
 
Method Summary
abstract  void clear()
          Abstract method to be implemented by every tab that clears the tab's image in the drawing area
 int compareTo(TabContainer otherTab)
          Implements comparable, so that tabs can be sorted by their layer position in the final image
 void dispose()
          Abstract method to be implemented by every tab to dispose all unnecessary resources
abstract  void disposeData()
           
abstract  void drawCurrentLayer(java.awt.Graphics2D g2d)
          Abstract method to be implemented by every tab that draws the resulting image on the DrawingContainer using is't g2d
abstract  java.lang.Object getCurrentState()
          Abstract method to be implemented by every tab that returns an Object containing the tab's current state
abstract  java.awt.image.BufferedImage getLayerImage()
          Abstract method to be implemented by every tab that returns the resulting image which will be drawn above original image
 org.eclipse.swt.graphics.Image getTabImage()
          Returns the tab name image
 java.lang.Integer getTabLayerPosition()
          Returns the position of this tab's layer on the final image
 java.lang.String getTabToolTipText()
          Returns the tab name toolTip text
abstract  java.awt.event.MouseListener mouseListener()
          Abstract method to be implemented by every tab which returns a mouse listener that is notified when the mouse is in the project's drawing area
abstract  java.awt.event.MouseMotionListener mouseMotionListener()
          Abstract method to be implemented by every tab which returns a mouse motion listener that is notified when the mouse is in the project's drawing area
abstract  void originalImageChanged()
          Abstract method to be implemented by every tab that is notified whenever the original drawing area's image has changed it's position, size or rotation
abstract  void setCurrentState(java.lang.Object o)
          Abstract method to be implemented by every tab that changes the current tab state to the new given tab state
protected  void setTabImage(org.eclipse.swt.graphics.Image tabImage)
          Sets the tab image that will be shown on tab name
protected  void setTabToolTipText(java.lang.String tabToolTipText)
          Sets the tab name toolTip text
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tabsContainer

protected TabsContainer tabsContainer
The parent of this tab is TabsContainer

Constructor Detail

TabContainer

public TabContainer(TabsContainer parent,
                    int style,
                    int tabLayerPosition)
Default constructor for TabContainer Note: setTabImage and setTabTooltipText should be called when the new tab is constructed.

Parameters:
parent - The parent composite
style - SWT styles
tabLayerPosition - the tab's layer position on the final image
Method Detail

setTabImage

protected void setTabImage(org.eclipse.swt.graphics.Image tabImage)
Sets the tab image that will be shown on tab name

Parameters:
tabImage - the tab image

setTabToolTipText

protected void setTabToolTipText(java.lang.String tabToolTipText)
Sets the tab name toolTip text

Parameters:
tabToolTipText -

getTabImage

public org.eclipse.swt.graphics.Image getTabImage()
Returns the tab name image

Returns:
the tab name image

getTabToolTipText

public java.lang.String getTabToolTipText()
Returns the tab name toolTip text

Returns:
toolTip text

getTabLayerPosition

public java.lang.Integer getTabLayerPosition()
Returns the position of this tab's layer on the final image

Returns:
the layer position on the final image

compareTo

public int compareTo(TabContainer otherTab)
Implements comparable, so that tabs can be sorted by their layer position in the final image

Specified by:
compareTo in interface java.lang.Comparable<TabContainer>

getLayerImage

public abstract java.awt.image.BufferedImage getLayerImage()
Abstract method to be implemented by every tab that returns the resulting image which will be drawn above original image

Returns:
the resulting image layer for this tab

mouseListener

public abstract java.awt.event.MouseListener mouseListener()
Abstract method to be implemented by every tab which returns a mouse listener that is notified when the mouse is in the project's drawing area


mouseMotionListener

public abstract java.awt.event.MouseMotionListener mouseMotionListener()
Abstract method to be implemented by every tab which returns a mouse motion listener that is notified when the mouse is in the project's drawing area


drawCurrentLayer

public abstract void drawCurrentLayer(java.awt.Graphics2D g2d)
Abstract method to be implemented by every tab that draws the resulting image on the DrawingContainer using is't g2d

Parameters:
g2d - DrawingContainer's Graphics2D

getCurrentState

public abstract java.lang.Object getCurrentState()
Abstract method to be implemented by every tab that returns an Object containing the tab's current state


setCurrentState

public abstract void setCurrentState(java.lang.Object o)
Abstract method to be implemented by every tab that changes the current tab state to the new given tab state


clear

public abstract void clear()
Abstract method to be implemented by every tab that clears the tab's image in the drawing area


originalImageChanged

public abstract void originalImageChanged()
Abstract method to be implemented by every tab that is notified whenever the original drawing area's image has changed it's position, size or rotation


dispose

public void dispose()
Abstract method to be implemented by every tab to dispose all unnecessary resources

Overrides:
dispose in class org.eclipse.swt.widgets.Widget

disposeData

public abstract void disposeData()