|
Ontimize 5.2072EN | |||||||||
| 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.ontimize.gui.field.DataField
com.ontimize.gui.field.MemoDataField
com.ontimize.gui.field.HTMLDataField
Main class to implement a specific HTML data field.
| Nested Class Summary | |
protected class |
HTMLDataField.ActionWrapper
Class to adapt the style field. |
protected class |
HTMLDataField.AlignListener
|
static class |
HTMLDataField.ExtForegroundAction
Main class to manage correctly the field color. |
protected static class |
HTMLDataField.ToggleButton
|
| Nested classes inherited from class com.ontimize.gui.field.MemoDataField |
MemoDataField.InnerDocumentListener |
| Nested classes inherited from class com.ontimize.gui.field.DataField |
DataField.AuxPanel, DataField.CopyActionListener, DataField.ELabel, DataField.FieldButton, DataField.FieldFocusListener, DataField.InfoMouseListener |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
protected boolean |
advancedQueryMode
|
protected javax.swing.ButtonGroup |
alignButtonGroup
|
protected HTMLDataField.AlignListener |
alignListener
|
protected static java.lang.String |
BOLD
|
protected javax.swing.JToggleButton |
boldBt
|
protected boolean |
borderbuttons
|
protected javax.swing.JPanel |
buttonsPanel
|
protected javax.swing.JToggleButton |
centerAlignBt
|
protected javax.swing.JButton |
colorButton
|
protected javax.swing.text.StyleContext |
context
|
protected javax.swing.text.html.HTMLEditorKit |
editor
Overwrite to avoid break line in the Writer |
protected int |
fontSizeStep
|
protected static java.lang.String |
HTML_BASE
|
protected static java.lang.String |
ITALIC
|
protected javax.swing.JToggleButton |
italicBt
|
protected int |
lastSelectedFontSize
|
protected javax.swing.JToggleButton |
leftAlignBt
|
protected java.awt.event.MouseListener |
listenerHighlightButtons
|
protected int |
maxFontSize
|
protected int |
minFontSize
|
protected boolean |
opaquebuttons
|
protected java.lang.String |
plainTextColumn
|
protected javax.swing.JToggleButton |
rightAlignBt
|
protected java.util.Hashtable |
styles
|
protected static java.lang.String |
TAB
|
static boolean |
toolBarFiller
Variable used to expand the toolbar or not. |
protected static java.lang.String |
UNDERLINE
|
protected javax.swing.JToggleButton |
underlineBt
|
| Fields inherited from class com.ontimize.gui.field.MemoDataField |
activationScrollTip, DE, dQuery, expandVertical, innerListener, maximumTextLength, parentFrame, queryKey, rows, scroll, scrollTip, searchMenu, selectAllKey, selectAllMenu, sqlTypeText, tabTransferFocus, translateDE, undoManager, uppercase, WHITE_SPACE |
| 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 com.ontimize.gui.field.AdvancedDataComponent |
ADVANCED_QUERY |
| Fields inherited from interface com.ontimize.gui.field.DataComponent |
COMP_FOCUS_YELLOW, GREEN_VERY_LIGHT, LIGHT_GRAY_BLUE, LIGHT_GREYISH_BLUE, VERY_LIGHT_BLUE, VERY_LIGHT_GRAY, VERY_LIGHT_PINK, VERY_LIGHT_RED, VERY_LIGHT_SKYBLUE, VERY_LIGHT_YELLOW, VERY_LIGHT_YELLOW_2 |
| Fields inherited from interface com.ontimize.gui.field.FormComponent |
DEBUG |
| Fields inherited from interface com.ontimize.gui.i18n.Internationalization |
DEBUG_LANGUAGE |
| Fields inherited from interface com.ontimize.gui.SecureElement |
DESACTIVATE_COMPONENT_BY_PERMISSION_TIP |
| Fields inherited from interface com.ontimize.util.templates.ITemplateField |
DATA_TYPE_FIELD, DATA_TYPE_FIELD_ATTR, DATA_TYPE_IMAGE, DATA_TYPE_IMAGE_ATTR, DATA_TYPE_TABLE, DATA_TYPE_TABLE_ATTR, TEMPLATE_DATA_TYPE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, PROPERTIES, SOMEBITS |
| Constructor Summary | |
HTMLDataField(java.util.Hashtable parameters)
Initializes parameters. |
|
| Method Summary | |
protected void |
configureButtonsPanelAndEditor()
|
protected void |
createDataField()
Creates the field and overrides the JComponent.processKeyEvent(KeyEvent)
method for managing focus. |
protected void |
createFontSizeCombo()
Creates a combo with height fonts minFontSize to maxFontSize. |
protected void |
createStyles()
Creates styles(underlined, bold, ...) |
void |
deleteData()
The method to delete data for component. |
java.lang.String |
getName()
|
protected java.awt.Font |
getSelectedTextFont(int offset,
int length)
|
int |
getTemplateDataType()
Returns the data type. |
java.lang.Object |
getTemplateDataValue()
Gets an image with content of rendered field. |
java.lang.Object |
getValue()
Gets the value of a component. |
void |
init(java.util.Hashtable params)
Main method to init an object from parameters hashtable.
|
protected void |
installButtonsHandler()
Installs the button handler to manage buttons for document. |
protected void |
installSelectionTextListener()
|
boolean |
isEmpty()
Checks the data existence in component. |
void |
setAdvancedQueryMode(boolean mode)
This method must establish the advanced query state, to support advanced query conditions. |
void |
setButtonPanelVisible(boolean v)
Sets visible the buttons panel. |
protected void |
setCharacterAttributes(javax.swing.text.AttributeSet attr,
boolean replace)
Changes the character attributes. |
void |
setEnabled(boolean en)
Description method to set enabled or not the component according the boolean condition in parameter. |
protected void |
setParagraphAttributes(int offset,
int length,
javax.swing.text.AttributeSet at,
boolean replace)
Sets paragraph attributes. |
protected void |
setTextAttributes(int offset,
int length,
javax.swing.text.AttributeSet at,
boolean replace)
Sets text attributes. |
protected void |
setTextFontColor(int offset,
int length,
java.awt.Color c)
|
protected void |
setTextFontSize(int offset,
int length,
int size)
|
void |
setValue(java.lang.Object value)
Sets the value for component. |
| Methods inherited from class com.ontimize.gui.field.MemoDataField |
createPopupMenu, enableInnerListener, free, getConstraints, getRowNumber, getSQLDataType, getText, getTextsToTranslate, hideScrollTip, installInnerListener, installScrollListener, registerUndoableListener, registerUndoRedoActions, setComponentLocale, setMaxLength, setParentFrame, setResourceBundle, showPopupMenu, showScrollTip, updateBackgroundColor |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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 |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ontimize.gui.field.DataComponent |
getLabelComponentText, getSQLDataType, isHidden, isModifiable, isModified, isRequired, setModifiable, setRequired |
| Methods inherited from interface com.ontimize.gui.field.FormComponent |
getConstraints, isEnabled, setVisible |
| Methods inherited from interface com.ontimize.gui.i18n.Internationalization |
getTextsToTranslate, setComponentLocale, setResourceBundle |
| Methods inherited from interface com.ontimize.gui.field.IdentifiedElement |
getAttribute |
| Methods inherited from interface com.ontimize.gui.SecureElement |
initPermissions, isRestricted |
| Field Detail |
public static boolean toolBarFiller
protected static final java.lang.String BOLD
protected static final java.lang.String ITALIC
protected static final java.lang.String UNDERLINE
protected static final java.lang.String HTML_BASE
protected static final java.lang.String TAB
protected int minFontSize
protected int maxFontSize
protected int fontSizeStep
protected boolean opaquebuttons
protected boolean borderbuttons
protected java.awt.event.MouseListener listenerHighlightButtons
protected int lastSelectedFontSize
protected javax.swing.JPanel buttonsPanel
protected javax.swing.JToggleButton boldBt
protected javax.swing.JToggleButton italicBt
protected javax.swing.JToggleButton underlineBt
protected javax.swing.JToggleButton leftAlignBt
protected javax.swing.JToggleButton centerAlignBt
protected javax.swing.JToggleButton rightAlignBt
protected javax.swing.JButton colorButton
protected javax.swing.text.StyleContext context
protected java.util.Hashtable styles
protected javax.swing.text.html.HTMLEditorKit editor
protected java.lang.String plainTextColumn
protected boolean advancedQueryMode
protected HTMLDataField.AlignListener alignListener
protected javax.swing.ButtonGroup alignButtonGroup
| Constructor Detail |
public HTMLDataField(java.util.Hashtable parameters)
parameters - the Hashtable with parameters| Method Detail |
public void init(java.util.Hashtable params)
FormComponenthashtable.
init in interface FormComponentinit in class MemoDataFieldparams - the hashtable with parameters
| attribute | values | default | required | meaning |
| sqltexttype | yes/no | no | no | no -> Varchar ; yes -> LongVarchar. |
| uppercase | yes/no | no | no | The uppercase condition. |
| rows | no | The number of rows. | ||
| maxlength | no | The maxlength for component. | ||
| expand | yes/no | no | The vertical expansion. |
protected void createFontSizeCombo()
minFontSize to maxFontSize.
protected void installButtonsHandler()
public void setEnabled(boolean en)
FormComponent
setEnabled in interface FormComponentsetEnabled in class DataFielden - the condition to set enableprotected void configureButtonsPanelAndEditor()
protected java.awt.Font getSelectedTextFont(int offset,
int length)
protected void installSelectionTextListener()
public void setValue(java.lang.Object value)
DataComponent
setValue in interface DataComponentsetValue in class MemoDataFieldpublic void deleteData()
DataComponent
deleteData in interface DataComponentdeleteData in class MemoDataFieldpublic java.lang.Object getValue()
DataComponent
getValue in interface DataComponentgetValue in class MemoDataFieldprotected void createStyles()
protected void createDataField()
MemoDataFieldJComponent.processKeyEvent(KeyEvent)
method for managing focus.
createDataField in class MemoDataFieldpublic java.lang.String getName()
protected void setTextAttributes(int offset,
int length,
javax.swing.text.AttributeSet at,
boolean replace)
offset - the start of changeslength - the lenght of changesat - the attribute setreplace - the condition replacement
protected void setCharacterAttributes(javax.swing.text.AttributeSet attr,
boolean replace)
attr - the attribute setreplace - the condition of replacement
protected void setParagraphAttributes(int offset,
int length,
javax.swing.text.AttributeSet at,
boolean replace)
offset - the start of changelength - the length of changeat - the attribute setreplace - the condition of replacement
protected void setTextFontSize(int offset,
int length,
int size)
protected void setTextFontColor(int offset,
int length,
java.awt.Color c)
public boolean isEmpty()
DataComponent
isEmpty in interface DataComponentisEmpty in class MemoDataFieldpublic void setButtonPanelVisible(boolean v)
v - the condition about visibility panelpublic void setAdvancedQueryMode(boolean mode)
AdvancedDataComponent
setAdvancedQueryMode in interface AdvancedDataComponentmode - the condition to enable this statepublic int getTemplateDataType()
ITemplateFieldITemplateField.DATA_TYPE_FIELD
ITemplateField.DATA_TYPE_IMAGE
ITemplateField.DATA_TYPE_TABLE
getTemplateDataType in interface ITemplateFieldint with the data type.public java.lang.Object getTemplateDataValue()
getTemplateDataValue in interface ITemplateField
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||