org.jtheque.core.managers.view.able
Interface ViewDelegate

All Known Implementing Classes:
SwingViewDelegate

public interface ViewDelegate

Author:
Baptiste Wicht

Method Summary
 void applyGlassPane(java.lang.Object glassPane)
          Apply the glass pane.
 java.lang.String askText(java.lang.String title)
          Ask the user for text.
 boolean askYesOrNo(java.lang.String text, java.lang.String title)
          Ask the user for a yes or no answer.
 java.lang.String chooseDirectory()
          Choose a directory.
 java.lang.String chooseFile(org.jtheque.utils.io.SimpleFilter filter)
          Choose a file.
 void configure(WindowConfiguration configuration, IView view)
          Configure the view with the window configuration.
 void displayError(JThequeError error)
          Display an error.
 void displayText(java.lang.String text)
          Display the text.
 void fill(WindowConfiguration configuration, IView view)
          Fill the configuration with the view informations.
 void refresh(java.lang.Object c)
          Refresh the object.
 void run(java.lang.Runnable runnable)
          Run the runnable in the view.
 void setSize(IView view, int defaultWidth, int defaultHeight)
          Set size of the view considering the configuration of the view.
 

Method Detail

askYesOrNo

boolean askYesOrNo(java.lang.String text,
                   java.lang.String title)
Ask the user for a yes or no answer.

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

displayError

void displayError(JThequeError error)
Display an error.

Parameters:
error - The error to display.

displayText

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

Parameters:
text - The text to display.

chooseFile

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

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

chooseDirectory

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

Returns:
The choosed directory.

run

void run(java.lang.Runnable runnable)
Run the runnable in the view.

Parameters:
runnable - The runnable to run in the view.

refresh

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

Parameters:
c - The object to refresh.

applyGlassPane

void applyGlassPane(java.lang.Object glassPane)
Apply the glass pane.

Parameters:
glassPane - The glass pane.

setSize

void setSize(IView view,
             int defaultWidth,
             int defaultHeight)
Set size of the view considering the configuration of the view.

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

fill

void fill(WindowConfiguration configuration,
          IView view)
Fill the configuration with the view informations.

Parameters:
configuration - The configuration to fill.
view - The view to fill the configuration with.

configure

void configure(WindowConfiguration configuration,
               IView view)
Configure the view with the window configuration.

Parameters:
configuration - The window configuration.
view - The view to configure.

askText

java.lang.String askText(java.lang.String title)
Ask the user for text.

Parameters:
title - The question to ask to the user.
Returns:
The text of the user.


Copyright © 2009 JTheque. All Rights Reserved.