|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.japura.modal.Modal
public class Modal
Modal for frames and dialogs.
Adds a component as modal to the JFrame.
Each JFrame may have more than one component as modal, but only one component can be visible at once.
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
| Method Summary | |
|---|---|
static void |
addListener(javax.swing.JDialog dialog,
java.awt.Component component,
ModalListener listener)
|
static void |
addListener(javax.swing.JFrame frame,
java.awt.Component component,
ModalListener listener)
|
static void |
addListener(javax.swing.JInternalFrame frame,
java.awt.Component component,
ModalListener listener)
|
static void |
addModal(javax.swing.JDialog dialog,
java.awt.Component component)
Add a modal component in the dialog. |
static void |
addModal(javax.swing.JDialog dialog,
java.awt.Component component,
ModalListener listener)
Add a modal component in the dialog. |
static void |
addModal(javax.swing.JDialog dialog,
java.awt.Component component,
ModalListener listener,
java.lang.Integer modalDepth)
Add a modal component in the dialog. |
static void |
addModal(javax.swing.JFrame frame,
java.awt.Component component)
Add a modal component in the frame. |
static void |
addModal(javax.swing.JFrame frame,
java.awt.Component component,
ModalListener listener)
Add a modal component in the frame. |
static void |
addModal(javax.swing.JFrame frame,
java.awt.Component component,
ModalListener listener,
java.lang.Integer modalDepth)
Add a modal component in the frame. |
static void |
addModal(javax.swing.JInternalFrame frame,
java.awt.Component component)
Add a modal component in the internal frame. |
static void |
addModal(javax.swing.JInternalFrame frame,
java.awt.Component component,
ModalListener listener)
Add a modal component in the internal frame. |
static void |
addModal(javax.swing.JInternalFrame frame,
java.awt.Component component,
ModalListener listener,
java.lang.Integer modalDepth)
Add a modal component in the internal frame. |
static void |
closeAllModals(javax.swing.JDialog dialog)
Close all modals of a specific dialog. |
static void |
closeAllModals(javax.swing.JFrame frame)
Close all modals of a specific frame. |
static void |
closeAllModals(javax.swing.JInternalFrame frame)
Close all modals of a specific internal frame. |
static void |
closeCurrentModal(javax.swing.JDialog dialog)
Close the current modal component of a specific dialog. |
static void |
closeCurrentModal(javax.swing.JFrame frame)
Close the current modal component of a specific frame. |
static void |
closeCurrentModal(javax.swing.JInternalFrame frame)
Close the current modal component of a specific internal frame. |
static void |
closeModal(java.awt.Component component)
Close a specific modal component. |
static java.awt.Component |
getCurrentModal(javax.swing.JDialog dialog)
Get the current modal component of a specific dialog. |
static java.awt.Component |
getCurrentModal(javax.swing.JFrame frame)
Get the current modal component of a specific frame. |
static java.awt.Component |
getCurrentModal(javax.swing.JInternalFrame frame)
Get the current modal component of a specific internal frame. |
static int |
getModalCount(javax.swing.JDialog dialog)
Get the modal count of a specific dialog. |
static int |
getModalCount(javax.swing.JFrame frame)
Get the modal count of a specific frame. |
static int |
getModalCount(javax.swing.JInternalFrame frame)
Get the modal count of a specific internal frame. |
static boolean |
hasModal(javax.swing.JDialog dialog)
Indicates whether the dialog has a modal. |
static boolean |
hasModal(javax.swing.JFrame frame)
Indicates whether the frame has a modal. |
static boolean |
hasModal(javax.swing.JInternalFrame frame)
Indicates whether the internal frame has a modal. |
static boolean |
isModal(java.awt.Component component)
Indicates whether the component is a modal component. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.awt.Component getCurrentModal(javax.swing.JFrame frame)
frame - the frame with a modal
public static java.awt.Component getCurrentModal(javax.swing.JDialog dialog)
dialog - the dialog with a modal
public static java.awt.Component getCurrentModal(javax.swing.JInternalFrame frame)
frame - the internal frame with a modal
public static void closeCurrentModal(javax.swing.JFrame frame)
frame - the frame with a modalpublic static void closeCurrentModal(javax.swing.JDialog dialog)
dialog - the dialog with a modalpublic static void closeCurrentModal(javax.swing.JInternalFrame frame)
frame - the internal frame with a modalpublic static void closeModal(java.awt.Component component)
component - the modal's componentpublic static void closeAllModals(javax.swing.JFrame frame)
frame - the frame with a modalpublic static void closeAllModals(javax.swing.JDialog dialog)
dialog - the dialog with a modalpublic static void closeAllModals(javax.swing.JInternalFrame frame)
frame - the internal frame with a modalpublic static boolean hasModal(javax.swing.JFrame frame)
frame - the frame with a modal
public static boolean hasModal(javax.swing.JDialog dialog)
dialog - the dialog with a modal
public static boolean hasModal(javax.swing.JInternalFrame frame)
frame - the internal frame with a modal
public static boolean isModal(java.awt.Component component)
component - the component
public static void addModal(javax.swing.JInternalFrame frame,
java.awt.Component component)
frame - the internal framecomponent - the component for modal
public static void addModal(javax.swing.JInternalFrame frame,
java.awt.Component component,
ModalListener listener)
frame - the internal framecomponent - the component for modallistener - the listener for modal
public static void addModal(javax.swing.JInternalFrame frame,
java.awt.Component component,
ModalListener listener,
java.lang.Integer modalDepth)
frame - the internal framecomponent - the component for modallistener - the listener for modalmodalDepth - the depth for modal
public static void addModal(javax.swing.JDialog dialog,
java.awt.Component component)
dialog - the dialogcomponent - the component for modal
public static void addModal(javax.swing.JDialog dialog,
java.awt.Component component,
ModalListener listener)
dialog - the dialogcomponent - the component for modallistener - the listener for modal
public static void addModal(javax.swing.JDialog dialog,
java.awt.Component component,
ModalListener listener,
java.lang.Integer modalDepth)
dialog - the dialogcomponent - the component for modallistener - the listener for modalmodalDepth - the depth for modal
public static void addModal(javax.swing.JFrame frame,
java.awt.Component component)
frame - the framecomponent - the component for modal
public static void addModal(javax.swing.JFrame frame,
java.awt.Component component,
ModalListener listener)
frame - the framecomponent - the component for modallistener - the listener for modal
public static void addModal(javax.swing.JFrame frame,
java.awt.Component component,
ModalListener listener,
java.lang.Integer modalDepth)
frame - the framecomponent - the component for modallistener - the listener for modalmodalDepth - the depth for modal
public static void addListener(javax.swing.JFrame frame,
java.awt.Component component,
ModalListener listener)
public static void addListener(javax.swing.JDialog dialog,
java.awt.Component component,
ModalListener listener)
public static void addListener(javax.swing.JInternalFrame frame,
java.awt.Component component,
ModalListener listener)
public static int getModalCount(javax.swing.JFrame frame)
frame - the frame with a modal
public static int getModalCount(javax.swing.JDialog dialog)
dialog - the dialog with a modal
public static int getModalCount(javax.swing.JInternalFrame frame)
frame - the internal frame with a modal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||