|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
tabs.TabsContainer
public class TabsContainer
Instances of this class that represents the TabFolder to be used by the ProjectWindow
| Field Summary | |
|---|---|
protected int |
MAX_UNDO_HISTORY
|
protected int |
RESIZED_IMAGE_HEIGHT
|
protected int |
RESIZED_IMAGE_WIDTH
The width and height of the image that will be initialized by the ProjectWindow |
| Fields inherited from class org.eclipse.swt.widgets.Composite |
|---|
embeddedHandle |
| Fields inherited from class org.eclipse.swt.widgets.Widget |
|---|
handle |
| Constructor Summary | |
|---|---|
TabsContainer(ProjectWindow parent,
int style,
int resizedImageWidth,
int resizedImageHeight)
Constructs a new instance of this class that initializes all the tabs |
|
| Method Summary | |
|---|---|
void |
changeHairVisibility(boolean selection)
Hides or unhides the HairTab's hair image |
void |
clear()
Method that resets all the changes made to the original's project image |
void |
createHistoryStep()
Create a history step for the current active tab |
void |
createTabFolder()
This method initializes tabFolder, creates and adds all tabs on tabFolder |
void |
dispose()
Dispose all unused resources to reduce memory leaks |
void |
drawCurrentLayer(java.awt.Graphics2D g2d)
Calls the current tab to draw it's resulting image on the DrawingContainer using DrawingContainer's given Graphics2D |
java.awt.image.BufferedImage |
getCurrentLayer()
Method that returns the selected tab layer |
TabContainer |
getCurrentTab()
Method that returns the selected tab layer |
java.awt.image.BufferedImage |
getLowerLayers()
Method that returns an image containing all the layers that are below the selected tab layer, including the original image |
java.awt.image.BufferedImage |
getOriginalImage()
Returns a copy of the project's original image |
ProjectWindow |
getParentProject()
Returns the tabs container associated project |
java.awt.image.BufferedImage |
getUpperLayers()
Method that returns an image containing all the layers that are above the selected tab layer |
void |
originalImageChanged()
Notify all tabs that the projec't original image was changed (size, rotation, position) |
void |
redo()
Method that goes one step forward in the changes history |
void |
redrawImageArea(TabContainer callerTab)
Call for a complete redrawing of the project's drawing area |
void |
setLensPath()
Opens a dialog that allows the user to trace the eyes path for the lens tab |
void |
setLipsPath()
Opens a dialog that allows the user to trace the lips path for the lips tab |
void |
setOriginalImage(java.awt.image.BufferedImage originalImage)
Method that initializes the originalImage with the image read from file by the ProjectWindow class |
void |
setShadowPath()
Opens a dialog that allows the user to trace the eyes path for the shadow tab |
void |
undo()
Method that goes one step back in the changes history |
| 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 |
|---|
protected final int RESIZED_IMAGE_WIDTH
protected final int RESIZED_IMAGE_HEIGHT
protected final int MAX_UNDO_HISTORY
| Constructor Detail |
|---|
public TabsContainer(ProjectWindow parent,
int style,
int resizedImageWidth,
int resizedImageHeight)
parent - The parent compositestyle - SWT stylesresizedImageWidth - the width of the project's original imageresizedImageHeight - the height of the project's original image| Method Detail |
|---|
public void createTabFolder()
public java.awt.image.BufferedImage getUpperLayers()
public java.awt.image.BufferedImage getCurrentLayer()
public void drawCurrentLayer(java.awt.Graphics2D g2d)
g2d - DrawingContainer's Graphics2Dpublic java.awt.image.BufferedImage getLowerLayers()
public TabContainer getCurrentTab()
public void setOriginalImage(java.awt.image.BufferedImage originalImage)
originalImage - public void undo()
public void redo()
public void clear()
public void redrawImageArea(TabContainer callerTab)
Note that only the current tab has access to this feature. Other tabs calls that are in the background will be ignored
callerTab - the tab that calls for the redrawingpublic void createHistoryStep()
public ProjectWindow getParentProject()
public java.awt.image.BufferedImage getOriginalImage()
public void setShadowPath()
public void setLensPath()
public void setLipsPath()
public void changeHairVisibility(boolean selection)
HairTab's hair image
selection - true if the hair should be visible, false otherwisepublic void originalImageChanged()
public void dispose()
dispose in class org.eclipse.swt.widgets.Widget
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||