tabs
Class BlushTab

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

public class BlushTab
extends TabContainer

Instances of this class represents a tab that can be used to do blush to a person's face


Field Summary
protected  boolean imageAreaRedrawAllowed
          flag to indicate whether the tab has or not access to call for redrawing the image area
protected  boolean mouseOverLeftCheek
           
protected  boolean mouseOverRightCheek
           
protected  java.awt.Point oldLeftCheekPoint
           
protected  java.awt.Point oldRightCheekPoint
           
protected  int startX
           
protected  int startY
           
 
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
BlushTab(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
 
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

mouseOverLeftCheek

protected boolean mouseOverLeftCheek

mouseOverRightCheek

protected boolean mouseOverRightCheek

startX

protected int startX

startY

protected int startY

oldLeftCheekPoint

protected java.awt.Point oldLeftCheekPoint

oldRightCheekPoint

protected java.awt.Point oldRightCheekPoint

imageAreaRedrawAllowed

protected boolean imageAreaRedrawAllowed
flag to indicate whether the tab has or not access to call for redrawing the image area

Constructor Detail

BlushTab

public BlushTab(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


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

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

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

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

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

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