Package net.simplace.ui.tabview
Class FWTabView
java.lang.Object
net.simplace.ui.tabview.FWTabView
- All Implemented Interfaces:
ActionListener,EventListener,Observer,ChangeListener,HyperlinkListener
public class FWTabView
extends Object
implements ActionListener, ChangeListener, HyperlinkListener, Observer
Toolkit for arranging multiple extern panels in one target panel.
Just add the 'target'-panel to the desired viewcontainer.
Now u can create panels and use them as usuall (etc. adding some widgets,
setting viewport...). The manager will provide one tab/view if there
are * views. It also provides a popup with the default actions
- close all views.
- close this view.
- Author:
- Andreas Enders
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant-ID for the desktop.protected final FWTabViewPaneTabbedpane for displaying multiple views.protected final LinkedHashMap<Object,JPanel> Map containing the views(value) and their ids (key). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent aActionEvent) voidaddViewManagerListener(FWTabViewListener aListener) voidcloseSelectedView(boolean aSuppressApproving) booleancreateView(Object aID, String aCaption, JPanel aView, String aSystemID) booleancreateView(Object aID, JPanel aView, String aSystemID) voidvoiddisposeAll(boolean aLeaveCurrent, boolean aForceDispose) voiddisposeView(Object aID, boolean aShouldBeApproved) voidfireActionEvent(ActionListener aActionListener, String aCommand) getIDOfComponent(JPanel aComponent) Sets a new title for the given id.static FWTabViewReturns the only instance of this class.intReturns the view for the given oid.booleanindicates if a given view is already openedvoidhyperlinkUpdate(HyperlinkEvent aHyperlinkEvent) This method is called when a click action is performed on a Link.It sets an HTMLtext to JEditorPanebooleanisViewVisible(String aViewID) Returns whether or not there is an existing view with the given id.voidremoveViewManagerListener(FWTabViewListener aListener) voidselectView(Object aID) voidsetDefaultCursor(String aSystemID) voidsetEmptyPanel(JPanel aNewEmptyPanel) Replaces the emptyPanel.voidsetTabPlacement(int aOrientation) Sets a new orientation to the tabpane.voidsetWaitCursor(String aSystemID) voidstateChanged(ChangeEvent aChangeEvent) Informs the listeners when a view is selected.voidupdate(Observable aObservable, Object aEvent)
-
Field Details
-
DESKTOP_ID
Constant-ID for the desktop.- See Also:
-
iViewMap
Map containing the views(value) and their ids (key). -
iTabbedPane
Tabbedpane for displaying multiple views.
-
-
Constructor Details
-
FWTabView
protected FWTabView(boolean aShowDesktopTab) Default constructor. Initiates the basic elements.- Parameters:
aShowDesktopTab-
-
-
Method Details
-
getInstance
Returns the only instance of this class.- Returns:
-
createView
- Parameters:
aID-aCaption-aView-aSystemID-- Returns:
- true, if the view was created successfully, otherwise returns false
-
createView
- Parameters:
aID-aCaption-aView-aSystemID-aIcon-aFormrenderer-- Returns:
- true, if the view was created successfully, otherwise returns false
-
disposeView
- Parameters:
aID-aShouldBeApproved-
-
disposeAll
public void disposeAll() -
disposeAll
public void disposeAll(boolean aLeaveCurrent, boolean aForceDispose) - Parameters:
aLeaveCurrent-aForceDispose-
-
selectView
- Parameters:
aID-
-
getSelectedView
- Returns:
- Component at selected index
-
getView
Returns the view for the given oid.- Parameters:
aOID-- Returns:
-
getSelectedViewID
- Returns:
- selected view ID
-
closeSelectedView
public void closeSelectedView(boolean aSuppressApproving) - Parameters:
aSuppressApproving-aApproveQuestion-
-
isViewVisible
Returns whether or not there is an existing view with the given id.- Parameters:
aViewID-- Returns:
-
getTabCount
public int getTabCount()- Returns:
- number of tabs
-
getTargetPanel
- Returns:
- target Panel
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
fireActionEvent
- Parameters:
aActionListener-aCommand-
-
stateChanged
Informs the listeners when a view is selected.- Specified by:
stateChangedin interfaceChangeListener
-
addViewManagerListener
- Parameters:
aListener-
-
removeViewManagerListener
- Parameters:
aListener-
-
hyperlinkUpdate
This method is called when a click action is performed on a Link.It sets an HTMLtext to JEditorPane- Specified by:
hyperlinkUpdatein interfaceHyperlinkListener
-
setTabPlacement
public void setTabPlacement(int aOrientation) Sets a new orientation to the tabpane.- Parameters:
aOrientation-
-
setEmptyPanel
Replaces the emptyPanel.- Parameters:
aNewEmptyPanel-
-
getIDOfComponent
Sets a new title for the given id.- Parameters:
aComponent-- Returns:
-
hasView
indicates if a given view is already opened- Parameters:
aID-- Returns:
- true, if a given view is already opened, otherwise returns false
-
update
-
setWaitCursor
- Parameters:
aSystemID-
-
setDefaultCursor
- Parameters:
aSystemID-
-