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
Modifier and TypeFieldDescriptionstatic final String
Constant-ID for the desktop.protected final FWTabViewPane
Tabbedpane for displaying multiple views.protected final LinkedHashMap<Object,
JPanel> Map containing the views(value) and their ids (key). -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
actionPerformed
(ActionEvent aActionEvent) void
addViewManagerListener
(FWTabViewListener aListener) void
closeSelectedView
(boolean aSuppressApproving) boolean
createView
(Object aID, String aCaption, JPanel aView, String aSystemID) boolean
createView
(Object aID, JPanel aView, String aSystemID) void
void
disposeAll
(boolean aLeaveCurrent, boolean aForceDispose) void
disposeView
(Object aID, boolean aShouldBeApproved) void
fireActionEvent
(ActionListener aActionListener, String aCommand) getIDOfComponent
(JPanel aComponent) Sets a new title for the given id.static FWTabView
Returns the only instance of this class.int
Returns the view for the given oid.boolean
indicates if a given view is already openedvoid
hyperlinkUpdate
(HyperlinkEvent aHyperlinkEvent) This method is called when a click action is performed on a Link.It sets an HTMLtext to JEditorPaneboolean
isViewVisible
(String aViewID) Returns whether or not there is an existing view with the given id.void
removeViewManagerListener
(FWTabViewListener aListener) void
selectView
(Object aID) void
setDefaultCursor
(String aSystemID) void
setEmptyPanel
(JPanel aNewEmptyPanel) Replaces the emptyPanel.void
setTabPlacement
(int aOrientation) Sets a new orientation to the tabpane.void
setWaitCursor
(String aSystemID) void
stateChanged
(ChangeEvent aChangeEvent) Informs the listeners when a view is selected.void
update
(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:
actionPerformed
in interfaceActionListener
-
fireActionEvent
- Parameters:
aActionListener
-aCommand
-
-
stateChanged
Informs the listeners when a view is selected.- Specified by:
stateChanged
in 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:
hyperlinkUpdate
in 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
-
-