|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.jaxfront.swing.ui.visualizers.AbstractView
public abstract class AbstractView
This class represents an AbstractView which is derived from the class JPanel. This class defines abstract methods for all JAXFront Visualizers.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Field Summary | |
---|---|
static java.lang.String |
FILL
|
static java.lang.String |
FILL_NO_GROW
|
static int |
HEADER_HEIGHT_OFFSET
|
static java.lang.String |
PROPERTY_USER_CHANGED_SERIALIZE
|
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, 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 | |
---|---|
AbstractView()
AbstractView constructor. |
|
AbstractView(java.awt.LayoutManager layout)
AbstractView constructor. |
|
AbstractView(Type context)
AbstractView constructor. |
Method Summary | |
---|---|
void |
addNewChild()
Adds a new child to the list. |
void |
addTreeNode(boolean shouldBeSerialized)
Adds this type to the tree. |
static TabActionIcon |
createTabActionIcon(int index,
Type model,
javax.swing.Action tabAction,
javax.swing.Action tabInverseAction)
|
void |
doUserSerialization(boolean userSerialize)
|
void |
focusComponent(AbstractView view)
|
void |
focusFirstComponent(boolean allowTreeNodeHighlighting)
Sets the focus to the first editing component. |
void |
focusGained(java.awt.event.FocusEvent e)
|
void |
focusLost(java.awt.event.FocusEvent e)
|
FunctionalPanel |
getBorderPanel()
|
static JAXJComboBox |
getChoiceComboBox(JAXJComboBox comboBox,
java.awt.event.ActionListener listener,
CompositeType type,
Type choosenType)
Returns a combobox for the choices of this visualizer. |
ColumnSpec[] |
getColumnSpecLabelAndComponent()
|
Type |
getContext()
|
java.awt.Color |
getDefaultBackgroundColor()
Returns the default component background color. |
Document |
getDOM()
Returns the current JAXFront document (DOM). |
javax.swing.JComponent |
getEditorComponent()
Returns the editor component of the current visualizer. |
javax.swing.JPanel |
getEditorComponentPanel()
Returns the component panel. |
java.awt.Component |
getFirstFocusableComponent()
Returns the first focusable component of the current view which is needed to set the focus on the first component of a visualizer. |
MultiLineLabel |
getHintTextLabel()
Returns the hint label if defined in a XUI. |
Visualizer |
getImplementation()
|
javax.swing.JComponent |
getLabel()
Returns the label component of the current visualizer. |
javax.swing.JPanel |
getLabelPanel()
Returns the label panel. |
javax.swing.JPanel |
getLabelPanel(javax.swing.JComponent label)
Returns the label panel. |
java.lang.String |
getLabelText()
Returns the label of this visualizer. |
Type |
getModel()
Returns the model (type) of this visualizer. |
ColumnSpec[] |
getPercentageColumnSpecComponent()
|
RowSpec |
getRowSpec(java.lang.String layout)
|
RowSpec[] |
getRowSpecArray(java.lang.String layout)
|
RowSpec[] |
getRowSpecDefaultComponentHeight()
|
Type |
getSelectedType()
Returns the label of this visualizer. |
StyleDefinition |
getStyle()
|
javax.swing.JComponent |
getTableLabelComponent()
|
javax.swing.JPanel |
getVisualizerPanel()
Returns the visualizer panel (label and component) of the current visualizer. |
boolean |
isRunningInDialog()
Returns true if the current view is running in the dialog mode. |
boolean |
isViewReleased()
|
void |
itemStateChanged(java.awt.event.ItemEvent e)
|
void |
jumpTo()
Bring this visualizer to front and set the focus. |
abstract void |
markError()
Displays the error in a special way. |
abstract void |
populateModel()
Updates the model (type) that belongs to this visualizer. |
abstract void |
populateView()
Updates the view of this visualizer. |
void |
postInitialization()
Gets called after the UI factory has created this visualizer. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
|
void |
release()
Releases allocated resources for this visualizer. |
void |
removeHint()
Removes a user defined hint message below the current component. |
void |
removeLabel()
Removes the label from the view. |
void |
removeMessage()
Removes the validation error message from this type. |
void |
removeTreeNode(boolean shouldBeSerialized)
Removes this type from the tree. |
abstract void |
resetError()
Removes the error from this visualizer. |
void |
scrollToView(javax.swing.JComponent view)
|
void |
setApplicationRequired(boolean aBoolean)
Sets the view component to be required or not defined by the application not by xml schema. |
abstract void |
setChoosenKeyContextValue(java.lang.String xpathRelativeToChoosenKeyContext,
java.lang.String newValue)
|
void |
setCodeSetValues(java.lang.String url,
java.lang.String codeSetName,
java.lang.String[] values,
java.lang.String defaultSelection)
Sets the codeSet values for the current type. |
void |
setEditable(boolean editable)
Sets the view component editable . |
void |
setEditorComponent(javax.swing.JComponent editorComponent)
Set the editor component of the current visualizer. |
void |
setEnabled(boolean enabled)
Sets the view component enabled or disabled. |
void |
setEnabled(boolean enabled,
boolean setOptionalToo)
Sets the component enabled/disabled. |
void |
setFirstFocusableComponent(java.awt.Component component)
Sets the first focusable component of the current view. |
abstract void |
setLabelColor(java.awt.Color color)
Sets the foreground color for the label. |
void |
setLabelText(java.lang.String text)
Sets the label for this view |
void |
setModel(Type type)
Sets the model (type) for this visualizer. |
abstract void |
setRequired(boolean aBoolean)
Sets the view component to be required or not. |
void |
setSerializable(boolean isSerializable)
Sets a flag that defines if the content of the current type will be serialized or not. |
void |
setTableLableComponent(javax.swing.JComponent tableLabel)
|
void |
setTreeIcon(java.lang.String gifName)
Sets an icon next to the tree node. |
void |
setUserSerializable(boolean serialize)
|
void |
setValues(java.lang.String[] values,
java.lang.String classResolverName)
Sets the values for the current type. |
void |
setVisible(boolean visible)
Sets the view component visible or not visible. |
void |
setVisibleAndSerializable(boolean visible,
boolean serialize)
Sets the visualizer visible or invisible and allows to define if the content should be serialized or not. |
void |
showHint(java.lang.String text,
boolean isFormula,
java.awt.Color color,
boolean isBold)
Shows an user defined hint message below the current component. |
void |
showLabel(boolean show)
Sets the label of this visualizer visible or not visible. |
void |
showMessage(java.lang.String message,
java.lang.String classification,
boolean showDialog,
boolean needsUserAcceptance)
Shows an user defined message. |
void |
uiAction(java.lang.String name,
java.lang.Object value)
Initializes a defined ui action. |
boolean |
useUserModifiedSerialization()
|
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_USER_CHANGED_SERIALIZE
public static final int HEADER_HEIGHT_OFFSET
public static final java.lang.String FILL
public static final java.lang.String FILL_NO_GROW
Constructor Detail |
---|
public AbstractView()
public AbstractView(Type context)
public AbstractView(java.awt.LayoutManager layout)
layout
- a LayoutManager that is to be usedMethod Detail |
---|
public void postInitialization()
Visualizer
postInitialization
in interface Visualizer
public void addTreeNode(boolean shouldBeSerialized)
shouldBeSerialized
- defines if this type should be serializedpublic void removeTreeNode(boolean shouldBeSerialized)
shouldBeSerialized
- defines if the content of this type will be serializedpublic void addNewChild()
public static TabActionIcon createTabActionIcon(int index, Type model, javax.swing.Action tabAction, javax.swing.Action tabInverseAction)
public static JAXJComboBox getChoiceComboBox(JAXJComboBox comboBox, java.awt.event.ActionListener listener, CompositeType type, Type choosenType)
comboBox
- a comboboxlistener
- an actionListenertype
- an AbstractCompositeTypechoosenType
- the choosen type of the choice
public Document getDOM()
public javax.swing.JComponent getEditorComponent()
public void setEditorComponent(javax.swing.JComponent editorComponent)
public javax.swing.JComponent getLabel()
public javax.swing.JPanel getVisualizerPanel()
public java.lang.String getLabelText()
getLabelText
in interface Visualizer
public Type getModel()
Visualizer
getModel
in interface Visualizer
Visualizer.getModel()
public javax.swing.JPanel getLabelPanel()
public javax.swing.JPanel getLabelPanel(javax.swing.JComponent label)
public javax.swing.JPanel getEditorComponentPanel()
public void setUserSerializable(boolean serialize)
public boolean useUserModifiedSerialization()
public boolean isRunningInDialog()
public abstract void markError()
Visualizer
markError
in interface Visualizer
Visualizer.markError()
public abstract void populateModel()
Visualizer
populateModel
in interface Visualizer
Visualizer.populateModel()
public abstract void populateView()
Visualizer
populateView
in interface Visualizer
Visualizer.populateView()
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
public void release()
Visualizer
release
in interface Visualizer
Visualizer.release()
public void removeLabel()
Visualizer
removeLabel
in interface Visualizer
Visualizer.removeLabel()
public void removeMessage()
public void setSerializable(boolean isSerializable)
type
- a given typeisDefined
- defines if the content of this type will be serializedpublic abstract void resetError()
Visualizer
resetError
in interface Visualizer
Visualizer.resetError()
public abstract void setLabelColor(java.awt.Color color)
Visualizer
setLabelColor
in interface Visualizer
color
- label foreground colorVisualizer.setLabelColor(java.awt.Color)
public void setLabelText(java.lang.String text)
Visualizer
setLabelText
in interface Visualizer
public void setModel(Type type)
Visualizer
setModel
in interface Visualizer
type
- model for the visualizerVisualizer.setModel(com.jaxfront.core.type.Type)
public void setTreeIcon(java.lang.String gifName)
gifName
- the name of the iconpublic void setTableLableComponent(javax.swing.JComponent tableLabel)
public javax.swing.JComponent getTableLabelComponent()
public abstract void setRequired(boolean aBoolean)
Visualizer
setRequired
in interface Visualizer
aBoolean
- indicates if a visualizer requires user inputVisualizer.setRequired(boolean)
public void setApplicationRequired(boolean aBoolean)
Visualizer
setApplicationRequired
in interface Visualizer
aBoolean
- indicates if a visualizer required user inputVisualizer.setApplicationRequired(boolean)
public void setVisible(boolean visible)
Visualizer
setVisible
in interface Visualizer
setVisible
in class javax.swing.JComponent
visible
- visibility of the visualizerComponent.setVisible(boolean)
public void setVisibleAndSerializable(boolean visible, boolean serialize)
Component.setVisible(boolean)
public void showLabel(boolean show)
Visualizer
showLabel
in interface Visualizer
show
- visibility of the labelVisualizer.showLabel(boolean)
public void showMessage(java.lang.String message, java.lang.String classification, boolean showDialog, boolean needsUserAcceptance)
message
- a message textneedsUserAcceptance
- if true, the message resists until the user interacts.public void doUserSerialization(boolean userSerialize)
doUserSerialization
in interface ComplexVisualizer
public void showHint(java.lang.String text, boolean isFormula, java.awt.Color color, boolean isBold)
text
- a hint text or a formula expressionisFormula
- true, if the hint text should be treated as formula expressioncolor
- the color of the hint textisBold
- true, if the hint text should be displayed boldpublic void removeHint()
public void uiAction(java.lang.String name, java.lang.Object value)
name
- the name of the ui actionvalue
- a value of the ui actionpublic void setCodeSetValues(java.lang.String url, java.lang.String codeSetName, java.lang.String[] values, java.lang.String defaultSelection)
url
- the url of the codeSet to be setcodeSetName
- the name of the codeSet to be setvalues
- the values of the codeSetdefaultSelection
- the default selected code of the codesetpublic void setValues(java.lang.String[] values, java.lang.String classResolverName)
values
- the values to set in the enumerationclass
- name (must implement ValueResolver) is optionalpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
ItemListener.itemStateChanged(ItemEvent)
public void setEnabled(boolean enabled)
Visualizer
setEnabled
in interface Visualizer
setEnabled
in class javax.swing.JComponent
enabled
- enable/disable this visualizerComponent.setEnabled(boolean)
public void setEnabled(boolean enabled, boolean setOptionalToo)
enabled
- true, if the component should be enabledsetOptionalToo
- true, if the optionalCheckBox should be enabled truepublic java.awt.Color getDefaultBackgroundColor()
public abstract void setChoosenKeyContextValue(java.lang.String xpathRelativeToChoosenKeyContext, java.lang.String newValue)
com.jaxfront.core.type.AbstractType#setChoosenKeyContextValue(java.lang.String,
java.lang.String)
public Type getSelectedType()
public void scrollToView(javax.swing.JComponent view)
public java.awt.Component getFirstFocusableComponent()
public void setFirstFocusableComponent(java.awt.Component component)
component
- the first focusable componentpublic MultiLineLabel getHintTextLabel()
public void setEditable(boolean editable)
Visualizer
setEditable
in interface Visualizer
editable
- enable/disable this visualizerVisualizer.setEditable(boolean)
public void jumpTo()
Visualizer
jumpTo
in interface Visualizer
public ColumnSpec[] getColumnSpecLabelAndComponent()
public ColumnSpec[] getPercentageColumnSpecComponent()
public RowSpec[] getRowSpecDefaultComponentHeight()
public RowSpec getRowSpec(java.lang.String layout)
public RowSpec[] getRowSpecArray(java.lang.String layout)
public FunctionalPanel getBorderPanel()
public void focusFirstComponent(boolean allowTreeNodeHighlighting)
allowTreeNodeHighlighting
- true if the tree node of the first component should be
highlighted as selectedpublic void focusComponent(AbstractView view)
public void focusGained(java.awt.event.FocusEvent e)
focusGained
in interface java.awt.event.FocusListener
FocusListener.focusGained(java.awt.event.FocusEvent)
public void focusLost(java.awt.event.FocusEvent e)
focusLost
in interface java.awt.event.FocusListener
FocusListener.focusLost(java.awt.event.FocusEvent)
public Visualizer getImplementation()
getImplementation
in interface Visualizer
public Type getContext()
getContext
in interface Visualizer
public StyleDefinition getStyle()
public boolean isViewReleased()
isViewReleased
in interface Visualizer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |