org.jtheque.core.managers.view.impl
Class SwingViewDelegate

java.lang.Object
  extended by org.jtheque.core.managers.view.impl.SwingViewDelegate
All Implemented Interfaces:
ViewDelegate

public final class SwingViewDelegate
extends java.lang.Object
implements ViewDelegate

Author:
Baptiste Wicht

Constructor Summary
SwingViewDelegate()
           
 
Method Summary
 void applyGlassPane(java.lang.Object component)
          Apply the glass pane.
 java.lang.String askText(java.lang.String text)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingViewDelegate

public SwingViewDelegate()
Method Detail

askYesOrNo

public boolean askYesOrNo(java.lang.String text,
                          java.lang.String title)
Description copied from interface: ViewDelegate
Ask the user for a yes or no answer.

Specified by:
askYesOrNo in interface ViewDelegate
Parameters:
text - The question.
title - The question title.
Returns:
true if the user has answered yes else false.

displayError

public void displayError(JThequeError error)
Description copied from interface: ViewDelegate
Display an error.

Specified by:
displayError in interface ViewDelegate
Parameters:
error - The error to display.

displayText

public void displayText(java.lang.String text)
Description copied from interface: ViewDelegate
Display the text.

Specified by:
displayText in interface ViewDelegate
Parameters:
text - The text to display.

chooseFile

public java.lang.String chooseFile(org.jtheque.utils.io.SimpleFilter filter)
Description copied from interface: ViewDelegate
Choose a file.

Specified by:
chooseFile in interface ViewDelegate
Parameters:
filter - The filter.
Returns:
The choosed file.

chooseDirectory

public java.lang.String chooseDirectory()
Description copied from interface: ViewDelegate
Choose a directory.

Specified by:
chooseDirectory in interface ViewDelegate
Returns:
The choosed directory.

run

public void run(java.lang.Runnable runnable)
Description copied from interface: ViewDelegate
Run the runnable in the view.

Specified by:
run in interface ViewDelegate
Parameters:
runnable - The runnable to run in the view.

refresh

public void refresh(java.lang.Object c)
Description copied from interface: ViewDelegate
Refresh the object.

Specified by:
refresh in interface ViewDelegate
Parameters:
c - The object to refresh.

applyGlassPane

public void applyGlassPane(java.lang.Object component)
Description copied from interface: ViewDelegate
Apply the glass pane.

Specified by:
applyGlassPane in interface ViewDelegate
Parameters:
component - The glass pane.

setSize

public void setSize(IView view,
                    int defaultWidth,
                    int defaultHeight)
Description copied from interface: ViewDelegate
Set size of the view considering the configuration of the view.

Specified by:
setSize in interface ViewDelegate
Parameters:
view - The view to configure. ̀
defaultWidth - The default width of the view.
defaultHeight - The default height of the view.

fill

public void fill(WindowConfiguration configuration,
                 IView view)
Description copied from interface: ViewDelegate
Fill the configuration with the view informations.

Specified by:
fill in interface ViewDelegate
Parameters:
configuration - The configuration to fill.
view - The view to fill the configuration with.

configure

public void configure(WindowConfiguration configuration,
                      IView view)
Description copied from interface: ViewDelegate
Configure the view with the window configuration.

Specified by:
configure in interface ViewDelegate
Parameters:
configuration - The window configuration.
view - The view to configure.

askText

public java.lang.String askText(java.lang.String text)
Description copied from interface: ViewDelegate
Ask the user for text.

Specified by:
askText in interface ViewDelegate
Parameters:
text - The question to ask to the user.
Returns:
The text of the user.


Copyright © 2009 JTheque. All Rights Reserved.