net.sourceforge.geeboss.view
Class EffectTabFolder

java.lang.Object
  extended by net.sourceforge.geeboss.view.EffectTabFolder
All Implemented Interfaces:
Translatable

public class EffectTabFolder
extends java.lang.Object
implements Translatable

This is the TabFolder that holds the currently edited effect


Field Summary
static int DISPLAY_MODE_FOCUS
          Display Mode: Focus Feed
static int DISPLAY_MODE_FOCUS_FIRST
          Display Mode: Focus Feed that is on Tabposition 1
static int DISPLAY_MODE_NO_FOCUS
          Display Mode: Do not Focus Feed
 
Constructor Summary
EffectTabFolder(org.eclipse.swt.widgets.Display display, org.eclipse.swt.widgets.Shell shell, org.eclipse.swt.custom.SashForm contentPane, MainView geebossGui, EventManager eventManager)
          Create a new EffectTabFolder.
 
Method Summary
 void addEffectToLastOpened(Effect effect)
           
 void closeAll()
          Close all opened tabs
 void closeCurrent()
          Close current opened tab
 void closeTab(org.eclipse.swt.custom.CTabItem tabItem)
          Close the given tabItem
 void displayEffect(Effect effect, int displayMode)
          Display the selected effect int tab folder
 boolean focusTab()
          Check wether new tabs should get focus.
 org.eclipse.swt.custom.CTabFolder getEffectHeaderTabFolder()
          Let other objects access this controll (for example to focus on it)
 EffectTabFolderDnd getEffectTabFolderDnd()
          Get the DND class that allows drag and drop on this tabfolder
 java.util.ArrayList<Effect> getLastOpenedEffects()
          Get the List with the last opened effects.
 org.eclipse.swt.custom.CTabItem getTabItem(Effect effect)
          Get the tabitem for the given effect or null.
 org.eclipse.swt.custom.CTabItem getTabItem(java.lang.String title)
          Get the tabitem for the given title or NULL.
 void gotoNextTab()
          Goto next tab
 void gotoPreviousTab()
          Goto previous tab
 boolean isTabOpened(java.lang.String title)
          Check if a tab with the given title is opened in the tabfolder.
 void onMouseDoubleClick(org.eclipse.swt.events.MouseEvent e)
          Called whenever the tabfolder is doubleclicked
 void setMaximized(boolean maximize)
          Maximize the header Tabfolder if maximized is true, otherwise restore the normal state.
 void showErrorTab(org.eclipse.swt.custom.CTabItem tabItem, java.lang.Exception e)
          Display an error as a new tab in the tab folder
 void showErrorTab(java.lang.String url, java.lang.Exception e)
          Display an warning as a new tab in the tab folder
 void showLicenseTab(java.io.InputStream inS, org.eclipse.swt.graphics.Image icon)
          Display the License in a new tab
 void showMessageTab(java.lang.String message, java.lang.String title, org.eclipse.swt.graphics.Image icon)
          Display a message in a new tab
 void updateI18N()
          Update all controlls text with i18n
 void updateTabFolderState()
          Update the state of the TabFolder and tell the MenuManager.
 void updateViewFormBorder()
          Update state of 3D Border outside the ViewForm if neccessary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISPLAY_MODE_FOCUS

public static final int DISPLAY_MODE_FOCUS
Display Mode: Focus Feed

See Also:
Constant Field Values

DISPLAY_MODE_FOCUS_FIRST

public static final int DISPLAY_MODE_FOCUS_FIRST
Display Mode: Focus Feed that is on Tabposition 1

See Also:
Constant Field Values

DISPLAY_MODE_NO_FOCUS

public static final int DISPLAY_MODE_NO_FOCUS
Display Mode: Do not Focus Feed

See Also:
Constant Field Values
Constructor Detail

EffectTabFolder

public EffectTabFolder(org.eclipse.swt.widgets.Display display,
                       org.eclipse.swt.widgets.Shell shell,
                       org.eclipse.swt.custom.SashForm contentPane,
                       MainView geebossGui,
                       EventManager eventManager)
Create a new EffectTabFolder.

Parameters:
display - The display
shell - The shell
contentPane - The Sashform where to add the ViewForm
geebossGui - Access some methods of the main controller
eventManager - The event manager
Method Detail

addEffectToLastOpened

public void addEffectToLastOpened(Effect effect)

displayEffect

public void displayEffect(Effect effect,
                          int displayMode)
Display the selected effect int tab folder

Parameters:
effect - the effect
displayMode - one of the supported displaymodes

focusTab

public boolean focusTab()
Check wether new tabs should get focus. Either the settings tells so, or only one tabitem is visible in the tabfolder. That item will always get focus.

Returns:
boolean true if the new tab should gain focus

getLastOpenedEffects

public java.util.ArrayList<Effect> getLastOpenedEffects()
Get the List with the last opened effects.

Returns:
Returns the lastOpenedFeeds.

getEffectHeaderTabFolder

public org.eclipse.swt.custom.CTabFolder getEffectHeaderTabFolder()
Let other objects access this controll (for example to focus on it)

Returns:
The tabfolder holding the feeds and news header

getEffectTabFolderDnd

public EffectTabFolderDnd getEffectTabFolderDnd()
Get the DND class that allows drag and drop on this tabfolder

Returns:
The dnd class of this tabfolder

getTabItem

public org.eclipse.swt.custom.CTabItem getTabItem(Effect effect)
Get the tabitem for the given effect or null.

Parameters:
effect - The effect that is aggregated
Returns:
CTabItem The Tab or null

getTabItem

public org.eclipse.swt.custom.CTabItem getTabItem(java.lang.String title)
Get the tabitem for the given title or NULL.

Parameters:
title - The title of the tab
Returns:
CTabItem The Tab or NULL

isTabOpened

public boolean isTabOpened(java.lang.String title)
Check if a tab with the given title is opened in the tabfolder.

Parameters:
title - The title to look for
Returns:
true if the tab is opened

showErrorTab

public void showErrorTab(org.eclipse.swt.custom.CTabItem tabItem,
                         java.lang.Exception e)
Display an error as a new tab in the tab folder

Parameters:
tabItem - The tabitem to load the error into
e - The exception that occured

showErrorTab

public void showErrorTab(java.lang.String url,
                         java.lang.Exception e)
Display an warning as a new tab in the tab folder

Parameters:
url - URL / Path that caused the exception
e - The exception that occured

showLicenseTab

public void showLicenseTab(java.io.InputStream inS,
                           org.eclipse.swt.graphics.Image icon)
Display the License in a new tab

Parameters:
inS - Source of the license file
icon - The icon to use for the tab

updateI18N

public void updateI18N()
Update all controlls text with i18n

Specified by:
updateI18N in interface Translatable

updateTabFolderState

public void updateTabFolderState()
Update the state of the TabFolder and tell the MenuManager. This method is called whenever the selection in the tabfolder changes, for example when a new tab is opened or another one was closed, revealing the tab that is left of it.


closeAll

public void closeAll()
Close all opened tabs


closeCurrent

public void closeCurrent()
Close current opened tab


closeTab

public void closeTab(org.eclipse.swt.custom.CTabItem tabItem)
Close the given tabItem

Parameters:
tabItem - Selected tabItem

gotoNextTab

public void gotoNextTab()
Goto next tab


gotoPreviousTab

public void gotoPreviousTab()
Goto previous tab


onMouseDoubleClick

public void onMouseDoubleClick(org.eclipse.swt.events.MouseEvent e)
Called whenever the tabfolder is doubleclicked

Parameters:
e - The occuring MouseEvent

setMaximized

public void setMaximized(boolean maximize)
Maximize the header Tabfolder if maximized is true, otherwise restore the normal state.

Parameters:
maximize - true if maximized

showMessageTab

public void showMessageTab(java.lang.String message,
                           java.lang.String title,
                           org.eclipse.swt.graphics.Image icon)
Display a message in a new tab

Parameters:
message - Message String
title - Title String
icon - The image icon to display

updateViewFormBorder

public void updateViewFormBorder()
Update state of 3D Border outside the ViewForm if neccessary



Copyright (c) 2005 The Geeboss team (http://geeboss.sourceforge.net). All Rights Reserved.