org.japura.controller
Class DefaultModalPanelFactory

java.lang.Object
  extended by org.japura.controller.DefaultModalPanelFactory
All Implemented Interfaces:
ModalPanelFactory

public class DefaultModalPanelFactory
extends java.lang.Object
implements ModalPanelFactory

Build default standards panels for modal.

Copyright (C) 2009, 2010 Carlos Eduardo Leite de Andrade

This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see www.gnu.org/licenses/

For more information, contact: www.japura.org

Author:
Carlos Eduardo Leite de Andrade
See Also:
ModalPanelFactory

Constructor Summary
DefaultModalPanelFactory()
           
 
Method Summary
 javax.swing.JComponent buildConfirmationPanel(Controller<?> controller, java.lang.String title, java.lang.String text, ModalAction confirmAction, ModalAction cancelAction)
          Build a confirmation message modal.
 javax.swing.JComponent buildErrorPanel(Controller<?> controller, java.lang.String title, java.lang.String text)
          Build a error message modal.
 javax.swing.JComponent buildInformationPanel(Controller<?> controller, java.lang.String title, java.lang.String text)
          Build a information message modal.
 javax.swing.JComponent buildQuestionPanel(Controller<?> controller, java.lang.String title, java.lang.String text, ModalAction yesAction, ModalAction noAction)
          Build a question message modal.
 javax.swing.JComponent buildWarningPanel(Controller<?> controller, java.lang.String title, java.lang.String text)
          Build a warning message modal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultModalPanelFactory

public DefaultModalPanelFactory()
Method Detail

buildConfirmationPanel

public javax.swing.JComponent buildConfirmationPanel(Controller<?> controller,
                                                     java.lang.String title,
                                                     java.lang.String text,
                                                     ModalAction confirmAction,
                                                     ModalAction cancelAction)
Description copied from interface: ModalPanelFactory
Build a confirmation message modal.

Specified by:
buildConfirmationPanel in interface ModalPanelFactory
Parameters:
controller - the controller
title - title for the modal
text - the confirmation
confirmAction - action for the confirmation button
cancelAction - action for the cancel button

buildErrorPanel

public javax.swing.JComponent buildErrorPanel(Controller<?> controller,
                                              java.lang.String title,
                                              java.lang.String text)
Description copied from interface: ModalPanelFactory
Build a error message modal.

Specified by:
buildErrorPanel in interface ModalPanelFactory
Parameters:
controller - the controller
title - title for the modal
text - the error

buildInformationPanel

public javax.swing.JComponent buildInformationPanel(Controller<?> controller,
                                                    java.lang.String title,
                                                    java.lang.String text)
Description copied from interface: ModalPanelFactory
Build a information message modal.

Specified by:
buildInformationPanel in interface ModalPanelFactory
Parameters:
controller - the controller
title - title for the modal
text - the information

buildQuestionPanel

public javax.swing.JComponent buildQuestionPanel(Controller<?> controller,
                                                 java.lang.String title,
                                                 java.lang.String text,
                                                 ModalAction yesAction,
                                                 ModalAction noAction)
Description copied from interface: ModalPanelFactory
Build a question message modal.

Specified by:
buildQuestionPanel in interface ModalPanelFactory
Parameters:
controller - the controller
title - title for the modal
text - the question
yesAction - action for the confirmation button
noAction - action for the cancel button

buildWarningPanel

public javax.swing.JComponent buildWarningPanel(Controller<?> controller,
                                                java.lang.String title,
                                                java.lang.String text)
Description copied from interface: ModalPanelFactory
Build a warning message modal.

Specified by:
buildWarningPanel in interface ModalPanelFactory
Parameters:
controller - the controller
title - title for the modal
text - the warning