|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
dsto.dfc.swing.forms.AbstractFormEditorComponent
dsto.dfc.swing.forms.PopupFormEditor
public class PopupFormEditor
Wrapper editor into which can be plugged an 'inline' editor which is displayed to the left of a '...' button, which shows a secondary 'popup' editor in a form dialog. To use in visual designer, drop inline and popup editors outside of panel, then set inlineEditor and popupEditor properties.
AbstractPopupEditor
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected dsto.dfc.swing.forms.PopupFormEditor.PopupDialog |
activeDialog
|
static int |
ALIGN_CENTER_CLIENT
|
static int |
ALIGN_CENTER_SCREEN
|
static int |
ALIGN_NONE
|
protected int |
dialogAlignment
|
static int |
EXPAND_BOTH
|
static int |
EXPAND_HORIZONTAL
|
static int |
EXPAND_NONE
|
static int |
EXPAND_VERTICAL
|
protected int |
expandInlineEditor
|
protected FormEditor |
inlineEditor
|
protected dsto.dfc.swing.forms.PopupFormEditor.Listener |
listener
|
protected JButton |
popupButton
|
protected FormEditor |
popupEditor
|
protected boolean |
popupInScrollPane
|
protected boolean |
popupModal
|
Fields inherited from class dsto.dfc.swing.forms.AbstractFormEditorComponent |
---|
description |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
PopupFormEditor()
|
|
PopupFormEditor(FormEditor inlineEditor,
FormEditor popupEditor)
|
Method Summary | |
---|---|
void |
commitEdits()
Default implementation does nothing. |
protected JScrollPane |
createScrollPane(Component popupComponent)
Create a scroll pane to wrap the popup editor. |
int |
getDialogAlignment()
|
Object |
getEditorValue()
Get the current value from the form editor. |
int |
getExpandInlineEditor()
|
FormEditor |
getInlineEditor()
|
JButton |
getPopupButton()
The "..." button that shows the popup editor. |
FormEditor |
getPopupEditor()
|
boolean |
isDirectEdit()
True if the editor directly edits the value passed in with setValue (). |
boolean |
isPopupInScrollPane()
|
boolean |
isPopupModal()
|
void |
requestFocus()
|
void |
setDialogAlignment(int newValue)
Set the alignment for the dialog containing the popup editor. |
void |
setEditorDescription(String newValue)
|
void |
setEditorValue(Object value)
Sets the value to be displayed/edited by the form editor. |
void |
setEnabled(boolean enabled)
Sets the inline editor and the popup editor to be enabled or disabled. |
void |
setExpandInlineEditor(int mode)
Set how the inlineEditor will be sized when extra space is available. |
void |
setFont(Font font)
|
void |
setInlineEditor(FormEditor newValue)
|
void |
setPopupEditor(FormEditor newValue)
|
void |
setPopupInScrollPane(boolean newValue)
If true, popup editor will be placed into a scroll pane when shown. |
void |
setPopupModal(boolean newValue)
If true, popup editor will be in a modal dialog (the default). |
void |
showPopup()
Show the popup editor. |
void |
updateUI()
|
Methods inherited from class dsto.dfc.swing.forms.AbstractFormEditorComponent |
---|
addFormEditorListener, fireEditComitted, fireEditCommitRequested, fireEditCommitted, getEditorComponent, getEditorDescription, getPreferredValueType, removeFormEditorListener, setObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.beans.Customizer |
---|
addPropertyChangeListener, removePropertyChangeListener |
Field Detail |
---|
public static final int EXPAND_NONE
public static final int EXPAND_HORIZONTAL
public static final int EXPAND_VERTICAL
public static final int EXPAND_BOTH
public static final int ALIGN_CENTER_CLIENT
public static final int ALIGN_CENTER_SCREEN
public static final int ALIGN_NONE
protected FormEditor inlineEditor
protected FormEditor popupEditor
protected JButton popupButton
protected int expandInlineEditor
protected boolean popupInScrollPane
protected boolean popupModal
protected int dialogAlignment
protected dsto.dfc.swing.forms.PopupFormEditor.PopupDialog activeDialog
protected dsto.dfc.swing.forms.PopupFormEditor.Listener listener
Constructor Detail |
---|
public PopupFormEditor()
public PopupFormEditor(FormEditor inlineEditor, FormEditor popupEditor)
Method Detail |
---|
public void updateUI()
updateUI
in class JComponent
public void requestFocus()
requestFocus
in class JComponent
public void setEditorDescription(String newValue)
setEditorDescription
in class AbstractFormEditorComponent
public void setFont(Font font)
setFont
in class JComponent
public JButton getPopupButton()
public boolean isPopupInScrollPane()
public void setPopupInScrollPane(boolean newValue)
public boolean isPopupModal()
public void setPopupModal(boolean newValue)
public void setDialogAlignment(int newValue)
newValue
- The new alignment: of ALIGN_CENTER_CLIENT (center the
dialog inside the client), ALIGN_CENTER_SCREEN (center the dialog in the
screen) or ALIGN_NONE (no centering).public int getDialogAlignment()
public void setInlineEditor(FormEditor newValue)
public FormEditor getInlineEditor()
public void setPopupEditor(FormEditor newValue)
public FormEditor getPopupEditor()
public void setExpandInlineEditor(int mode)
mode
- The expansion mode (one of the EXPAND_* constants).public int getExpandInlineEditor()
public void showPopup()
protected JScrollPane createScrollPane(Component popupComponent)
public void setEnabled(boolean enabled)
setEnabled
in class JComponent
public boolean isDirectEdit()
FormEditor
isDirectEdit
in interface FormEditor
isDirectEdit
in class AbstractFormEditorComponent
public void setEditorValue(Object value) throws IllegalFormatException
FormEditor
setEditorValue
in interface FormEditor
setEditorValue
in class AbstractFormEditorComponent
value
- The value to display.
IllegalFormatException
- if the value was not in the
correct format for display by this editor. The source specified
by the exception should be this FormEditor instance or a child.public Object getEditorValue() throws IllegalFormatException
FormEditor
getEditorValue
in interface FormEditor
getEditorValue
in class AbstractFormEditorComponent
IllegalFormatException
public void commitEdits()
AbstractFormEditorComponent
commitEdits
in interface FormEditor
commitEdits
in class AbstractFormEditorComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |