org.jtheque.core.managers.view
Interface IViewManager

All Known Implementing Classes:
ViewManager

public interface IViewManager

A view manager.

Author:
Baptiste Wicht

Method Summary
 void addConfigTabComponent(ConfigTabComponent component)
          Add config tab component.
 void addConfigTabListener(ConfigTabListener listener)
          Add a ConfigTabListener.
 void addStateBarComponent(StateBarComponent component)
          Add a statebar component.
 void addStateBarListener(StateBarListener listener)
          Add a statebar listener.
 void addTabComponent(TabComponent component)
          Add a tab component.
 void addTabListener(TabListener listener)
          Add a TabListener.
 boolean askI18nUserForConfirmation(java.lang.String textKey, java.lang.String titleKey)
          Ask the user for confirmation with internationalized message.
 boolean askUserForConfirmation(java.lang.String text, java.lang.String title)
          Ask user for confirmation.
 java.lang.String askUserForText(java.lang.String text)
          Ask the user for a text.
 java.lang.String chooseDirectory()
          Choose a directory.
 java.lang.String chooseFile(org.jtheque.utils.io.SimpleFilter filter)
          Choose a file.
 void closeAboutView()
          Close the about view.
 void closeCollectionView()
          Close the collection view.
 void closeSplashScreen()
          Close the splashscreen.
 void configureView(IView window, java.lang.String name, int defaultWidth, int defaultHeight)
          Configure a view.
 void displayAboutView()
          Display the about view.
 void displayChooseCollectionView()
          Display the choose collection view.
 void displayError(JThequeError error)
          Display an error.
 void displayI18nText(java.lang.String key)
          Display a internationalized.
 void displayMainView()
          Display the main view.
 void displayPrimaryModuleList()
          Display the primary module list.
 void displaySplashScreen()
          Display the splashscreen.
 void displayText(java.lang.String text)
          Display a text.
 void execute(SimpleTask task)
          Execute a task in the EDT.
<T> T
execute(Task<T> task)
          Execute a task in the EDT.
 ICollectionView getCollectionView()
          Return the collection view.
 java.util.List<ConfigTabComponent> getConfigTabComponents()
          Return all the config tab components.
 WindowsConfiguration getConfigurations()
          Return all window configuration.
 java.lang.Object getMainComponent()
          Return the main component.
 java.util.List<StateBarComponent> getStateBarComponents()
          Return all the statebar components.
 java.util.List<TabComponent> getTabComponents()
          Return all the tab components.
 ViewDefaults getViewDefaults()
          Return the view defaults.
 ViewDelegate getViewDelegate()
          Return the delegate view manager.
 Views getViews()
          Return the Views.
 boolean isTabMainComponent()
          Indicate if the tab is the main component or not.
 void refresh(java.lang.Object c)
          Refresh the component.
 void removeConfigTabComponent(ConfigTabComponent component)
          Remove the specified config tab component.
 void removeConfigTabListener(ConfigTabListener listener)
          Remove the specified ConfigTabListener.
 void removeMainComponent(java.lang.Object component)
          Remove the main component of the main view.
 void removeStateBarComponent(StateBarComponent component)
          Remove the specified statebar component.
 void removeStateBarListener(StateBarListener listener)
          Remove a statebar listener.
 void removeTabComponent(TabComponent component)
          Remove a tab component.
 void removeTabListener(TabListener listener)
          Remove the specified TabListener.
 void saveState(IView window, java.lang.String name)
          Save the current state of the window.
 void setMainComponent(java.lang.Object component)
          Set the main component of the main view.
 

Method Detail

addStateBarComponent

void addStateBarComponent(StateBarComponent component)
Add a statebar component.

Parameters:
component - The component to add to the statebar.

removeStateBarComponent

void removeStateBarComponent(StateBarComponent component)
Remove the specified statebar component.

Parameters:
component - The component to remove of to the statebar.

addStateBarListener

void addStateBarListener(StateBarListener listener)
Add a statebar listener.

Parameters:
listener - The listener to add.

removeStateBarListener

void removeStateBarListener(StateBarListener listener)
Remove a statebar listener.

Parameters:
listener - The listener to remove.

getStateBarComponents

java.util.List<StateBarComponent> getStateBarComponents()
Return all the statebar components.

Returns:
A List containing all the statebar components.

getTabComponents

java.util.List<TabComponent> getTabComponents()
Return all the tab components.

Returns:
A List containing all the tab components.

addTabComponent

void addTabComponent(TabComponent component)
Add a tab component.

Parameters:
component - The tab to add.

removeTabComponent

void removeTabComponent(TabComponent component)
Remove a tab component.

Parameters:
component - The tab to remove.

askUserForConfirmation

boolean askUserForConfirmation(java.lang.String text,
                               java.lang.String title)
Ask user for confirmation.

Parameters:
text - The question.
title - The title.
Returns:
true if the user has accepted else false.

askI18nUserForConfirmation

boolean askI18nUserForConfirmation(java.lang.String textKey,
                                   java.lang.String titleKey)
Ask the user for confirmation with internationalized message.

Parameters:
textKey - The question key.
titleKey - The title key.
Returns:
true if the user has accepted else false.

askUserForText

java.lang.String askUserForText(java.lang.String text)
Ask the user for a text.

Parameters:
text - The text prompt.
Returns:
The text of the user.

displayText

void displayText(java.lang.String text)
Display a text.

Parameters:
text - The text to display.

displayError

void displayError(JThequeError error)
Display an error.

Parameters:
error - The error to display.

displayI18nText

void displayI18nText(java.lang.String key)
Display a internationalized.

Parameters:
key - The internationalization key.

chooseFile

java.lang.String chooseFile(org.jtheque.utils.io.SimpleFilter filter)
Choose a file.

Parameters:
filter - A file filter.
Returns:
The choosed file.

chooseDirectory

java.lang.String chooseDirectory()
Choose a directory.

Returns:
The choosed directory.

addConfigTabComponent

void addConfigTabComponent(ConfigTabComponent component)
Add config tab component.

Parameters:
component - The config tab component to add.

removeConfigTabComponent

void removeConfigTabComponent(ConfigTabComponent component)
Remove the specified config tab component.

Parameters:
component - The config tab component to remove.

addConfigTabListener

void addConfigTabListener(ConfigTabListener listener)
Add a ConfigTabListener.

Parameters:
listener - The listener to add.

removeConfigTabListener

void removeConfigTabListener(ConfigTabListener listener)
Remove the specified ConfigTabListener.

Parameters:
listener - The listener to remove.

addTabListener

void addTabListener(TabListener listener)
Add a TabListener.

Parameters:
listener - The listener to add.

removeTabListener

void removeTabListener(TabListener listener)
Remove the specified TabListener.

Parameters:
listener - The listener to remove.

getConfigTabComponents

java.util.List<ConfigTabComponent> getConfigTabComponents()
Return all the config tab components.

Returns:
A List containing all the config tab components.

getViews

Views getViews()
Return the Views. It seems the class responsible for managing the different views.

Returns:
The Views object.

getConfigurations

WindowsConfiguration getConfigurations()
Return all window configuration.

Returns:
A onfiguration who encapsulate the configuration of differents views.

execute

void execute(SimpleTask task)
Execute a task in the EDT.

Parameters:
task - The task to execute.

execute

<T> T execute(Task<T> task)
Execute a task in the EDT.

Type Parameters:
T - The type of return.
Parameters:
task - The task to execute.
Returns:
The result of the task.

refresh

void refresh(java.lang.Object c)
Refresh the component.

Parameters:
c - The component to refresh.

displaySplashScreen

void displaySplashScreen()
Display the splashscreen.


closeSplashScreen

void closeSplashScreen()
Close the splashscreen.


setMainComponent

void setMainComponent(java.lang.Object component)
Set the main component of the main view.

Parameters:
component - The main component of the main view.

removeMainComponent

void removeMainComponent(java.lang.Object component)
Remove the main component of the main view.

Parameters:
component - The main component to remove.

isTabMainComponent

boolean isTabMainComponent()
Indicate if the tab is the main component or not.

Returns:
true if the tab is the main component else false.

getMainComponent

java.lang.Object getMainComponent()
Return the main component.

Returns:
The main component.

displayMainView

void displayMainView()
Display the main view.


displayAboutView

void displayAboutView()
Display the about view.


closeAboutView

void closeAboutView()
Close the about view.


displayChooseCollectionView

void displayChooseCollectionView()
Display the choose collection view.


closeCollectionView

void closeCollectionView()
Close the collection view.


getCollectionView

ICollectionView getCollectionView()
Return the collection view.

Returns:
The collection view.

getViewDefaults

ViewDefaults getViewDefaults()
Return the view defaults.

Returns:
The view defaults.

saveState

void saveState(IView window,
               java.lang.String name)
Save the current state of the window.

Parameters:
window - The window.
name - The name of the view.

configureView

void configureView(IView window,
                   java.lang.String name,
                   int defaultWidth,
                   int defaultHeight)
Configure a view. It seems sets the size and location of the view.

Parameters:
window - The window to configure.
name - The name of the view.
defaultWidth - The default width of the view.
defaultHeight - The default height of the view.

displayPrimaryModuleList

void displayPrimaryModuleList()
Display the primary module list.


getViewDelegate

ViewDelegate getViewDelegate()
Return the delegate view manager.

Returns:
The delegate view manager.


Copyright © 2009 JTheque. All Rights Reserved.