tabs
Class HairTab

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
                      extended by tabs.HairTab
All Implemented Interfaces:
java.lang.Comparable<TabContainer>, org.eclipse.swt.graphics.Drawable

public class HairTab
extends TabContainer

Instances of this class represents a tab that can be used to draw an hair style over the drawing's area image


Field Summary
protected  boolean doQualityScale
          flag to indicate whether the scaling should do a quality (slower) scale or a fast one
 
Fields inherited from class tabs.TabContainer
tabsContainer
 
Fields inherited from class org.eclipse.swt.widgets.Composite
embeddedHandle
 
Fields inherited from class org.eclipse.swt.widgets.Widget
handle
 
Constructor Summary
HairTab(TabsContainer parent, int style, int tabLayerPosition)
          Constructs a new instance of this class given its parent, a style value describing its behavior and appearance and this instance's position in the TabsContainer array
 
Method Summary
 void clear()
          Abstract method to be implemented by every tab that clears the tab's image in the drawing area
 void createBottomComposite()
          This method initializes bottomComposite
 void disposeData()
           
 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
 java.lang.Object getCurrentState()
          Abstract method to be implemented by every tab that returns an Object containing the tab's current state
 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
 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
 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
 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
 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
 void setHairIsVisible(boolean value)
          Indicate whether the hair tab should draw it's hair image in the drawing area
 
Methods inherited from class tabs.TabContainer
compareTo, dispose, getTabImage, getTabLayerPosition, getTabToolTipText, setTabImage, setTabToolTipText
 
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

doQualityScale

protected boolean doQualityScale
flag to indicate whether the scaling should do a quality (slower) scale or a fast one

Constructor Detail

HairTab

public HairTab(TabsContainer parent,
               int style,
               int tabLayerPosition)
Constructs a new instance of this class given its parent, a style value describing its behavior and appearance and this instance's position in the TabsContainer array

Parameters:
parent - a TabsContainer which will be the parent of the new instance
style - the style of the tab
tabLayerPosition - the tab's position in the TabsContainer array
Method Detail

createBottomComposite

public void createBottomComposite()
This method initializes bottomComposite


clear

public void clear()
Description copied from class: TabContainer
Abstract method to be implemented by every tab that clears the tab's image in the drawing area

Specified by:
clear in class TabContainer

drawCurrentLayer

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

Specified by:
drawCurrentLayer in class TabContainer
Parameters:
g2d - DrawingContainer's Graphics2D

getCurrentState

public java.lang.Object getCurrentState()
Description copied from class: TabContainer
Abstract method to be implemented by every tab that returns an Object containing the tab's current state

Specified by:
getCurrentState in class TabContainer

getLayerImage

public java.awt.image.BufferedImage getLayerImage()
Description copied from class: TabContainer
Abstract method to be implemented by every tab that returns the resulting image which will be drawn above original image

Specified by:
getLayerImage in class TabContainer
Returns:
the resulting image layer for this tab

setCurrentState

public void setCurrentState(java.lang.Object o)
Description copied from class: TabContainer
Abstract method to be implemented by every tab that changes the current tab state to the new given tab state

Specified by:
setCurrentState in class TabContainer

mouseListener

public java.awt.event.MouseListener mouseListener()
Description copied from class: TabContainer
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

Specified by:
mouseListener in class TabContainer

mouseMotionListener

public java.awt.event.MouseMotionListener mouseMotionListener()
Description copied from class: TabContainer
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

Specified by:
mouseMotionListener in class TabContainer

setHairIsVisible

public void setHairIsVisible(boolean value)
Indicate whether the hair tab should draw it's hair image in the drawing area

Parameters:
value - true for drawing the hair image, false otherwise

originalImageChanged

public void originalImageChanged()
Description copied from class: TabContainer
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

Specified by:
originalImageChanged in class TabContainer

disposeData

public void disposeData()
Specified by:
disposeData in class TabContainer