public class HTMLShefDataField extends MemoDataField implements AdvancedDataComponent, ITemplateField, ActionPerformedListener
| Modifier and Type | Class and Description |
|---|---|
protected class |
HTMLShefDataField.CaretHandler |
protected class |
HTMLShefDataField.FocusHandler |
protected class |
HTMLShefDataField.FontChangeHandler |
protected class |
HTMLShefDataField.FontSizeChangeHandler |
protected class |
HTMLShefDataField.ParagraphComboHandler |
protected class |
HTMLShefDataField.ParagraphComboRenderer |
protected class |
HTMLShefDataField.TextChangedHandler |
MemoDataField.InnerDocumentListenerDataField.AuxPanel, DataField.CopyActionListener, DataField.ELabel, DataField.FieldButton, DataField.FieldFocusListener, DataField.InfoMouseListener, DataField.ToggleButtonJPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategyactivationScrollTip, DE, dQuery, expandVertical, innerListener, maximumTextLength, parentFrame, queryKey, rows, scroll, scrollTip, searchMenu, selectAllKey, selectAllMenu, sqlTypeText, tabTransferFocus, translateDE, trim, TRIM, undoManager, uppercase, WHITE_SPACEALIGN, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, alignment, ASTERISK_REQUIRED_STYLE, ATTR, attribute, backgroundColor, BGCOLOR, bold, BOLD, BORDER, BORDER_REQUIRED_STYLE, borderText, BOTTOM, CENTER, CLIPBOARD_COPY, CLIPBOARD_COPY_es_ES, CLIPBOARD_CUT, CLIPBOARD_CUT_es_ES, CLIPBOARD_PASTE, CLIPBOARD_PASTE_es_ES, conditions, dataField, DEFAULT_BORDER, DEFAULT_BOTTOM_MARGIN, DEFAULT_FIELD_LEFT_MARGIN, DEFAULT_FIELD_RIGHT_MARGIN, DEFAULT_LABEL_LEFT_MARGIN, DEFAULT_LABEL_RIGHT_MARGIN, DEFAULT_PARENT_MARGIN, DEFAULT_PARENT_MARGIN_FOR_SCROLL, DEFAULT_TOP_MARGIN, defaultAsteriskColor, DEFAULTBORDER, defaultDisableBackgroundColor, defaultFieldButtonHigh, defaultPreferenceTextNotRetrievedFromPreferences, DEFINE_HELP_FIELD_PREFERENCE, dim, DIM, disabledbgcolor, DISABLEDBGCOLOR, empty, enabled, ENABLED, EXPAND, FIELD_HELP_TIP, fieldlistenerFocus, fieldSize, fireValueEvents, FOCUS_BACKGROUNDCOLOR, FONT, fontColor, FONTCOLOR, fontSize, FONTSIZE, height, HEIGHT, incrementalFont, initPreferenceHelpText, INSETS, isEnabled, LABELALIGN, labelComponent, LABELFONT, LABELFONTCOLOR, labelPosition, LABELPOSITION, LABELSIZE, labelText, LABELVISIBLE, LEFT, locale, LOWERED, menuCopy, menuCut, menuDefineHelpPreference, menuHelpPreferences, menuPaste, modifiable, NO_STR, NONE, noRequiredBorder, OPAQUE, originalSize, OUTBORDER, panel, parentForm, permissionActivate, permissionVisible, popupMenu, PREF_WIDTH, prefWidth, RAISED, redimensionPanel, redimensJTextField, required, REQUIRED, requiredBorder, REQUIREDBORDER, requiredFieldBackgroundColor, requiredFieldForegroundColor, resources, restricted, RIGHT, show, showLabel, SIZE, TEXT_STR, TEXTALIGN, textAlignment, textHelpPreference, TIP, tipKey, TOP, validData, VALIGN, Valignment, valueListener, valueSave, VISIBLE, VISUALIZE_HELP_FIELD_PREFERENCE, weightDataFieldH, weightPanelH, width, WIDTH, x, X, y, Y, YES_STRaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTADVANCED_QUERYCOMP_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_2DEBUG_LANGUAGEDESACTIVATE_COMPONENT_BY_PERMISSION_TIPDATA_TYPE_FIELD, DATA_TYPE_FIELD_ATTR, DATA_TYPE_IMAGE, DATA_TYPE_IMAGE_ATTR, DATA_TYPE_TABLE, DATA_TYPE_TABLE_ATTR, TEMPLATE_DATA_TYPEABORT, ALLBITS, ERROR, FRAMEBITS, PROPERTIES, SOMEBITS| Constructor and Description |
|---|
HTMLShefDataField(Hashtable parameters)
Initializes parameters.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToolBarSeparator(JPanel buttonsPanel) |
protected void |
addToToolBar(JPanel buttonsPanel,
Action act) |
protected void |
changePanelButtons() |
protected void |
configToolbarButton(AbstractButton button) |
protected void |
configureButtonsPanelAndEditor() |
protected void |
createDataField()
Creates the field and overrides the
JComponent.processKeyEvent(KeyEvent)
method for managing focus. |
protected void |
createFontFamilyCombo()
Creates a combo with font families.
|
protected void |
createFontSizeCombo()
Creates a combo with height fonts
minFontSize to
maxFontSize. |
protected void |
createParagraphCombo()
Creates a combo with paragraph styles.
|
protected void |
createPopupMenu()
Creates a pop-up menu.
|
void |
deleteData()
The method to delete data for component.
|
protected void |
enableButtonsPanelComponents(boolean enabled) |
protected Font |
getSelectedTextFont(int offset,
int length) |
int |
getTemplateDataType()
Returns the data type.
|
Object |
getTemplateDataValue()
Gets an image with content of rendered field.
|
Object |
getValue()
Gets the value of a component.
|
void |
init(Hashtable params)
Initializes parameters.
|
protected void |
initializeHandlers() |
protected void |
insertHTML(String html,
int location) |
boolean |
isEmpty()
Checks the data existence in component.
|
void |
postActionPerformed(ActionEvent e)
Method called after action is performed
|
void |
previousActionPerformed(ActionEvent e)
Method called before action is performed
|
protected void |
registerKeystroke() |
protected void |
registerUndoableListener() |
protected void |
registerUndoRedoActions() |
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.
|
void |
setEnabled(boolean en)
Enables the field to insert data.
|
void |
setResourceBundle(ResourceBundle res)
Sets the language resource bundle.
|
protected void |
setTextFontSize(int offset,
int length,
int size) |
void |
setValue(Object value)
Sets the value for component.
|
protected void |
showPopupMenu(Component source,
int x,
int y)
Shows the pop-up menu.
|
protected Action[] |
toArray(org.bushe.swing.action.ActionList lst)
Converts an action list to an array.
|
protected void |
translateJMenu(JMenu menu) |
protected void |
updateState() |
protected void |
updateState(CaretEvent e) |
enableInnerListener, free, getConstraints, getRowNumber, getSQLDataType, getText, getTextsToTranslate, hideScrollTip, installInnerListener, installScrollListener, setComponentLocale, setMaxLength, setParentFrame, showScrollTip, updateBackgroundColoraddFocusListener, addHelpMenuPopup, addValueChangeListener, changeButton, changeOpacity, checkDefineHelpPermission, checkEnabledPermission, checkVisiblePermission, configurePopupMenuHelp, createFocusListener, createInstanceConditionCombo, defineHelpField, finalize, fireValueChanged, getAttribute, getBorder, getDataField, getDisabledbgcolor, getFontColor, getHelpIdString, getHelpPreferenceKey, getLabelComponent, getLabelComponentText, getLabelFontColor, getLabelText, getParentForm, getPreferenceHelpText, getPreferredSize, getValueChangeListeners, hasHelpInPreferences, initPermissions, initPreferences, installFocusListener, installHelpId, installPopupMenuListener, installPreferenceHelpListener, isAdvancedQueryMode, isEnabled, isHidden, isLabelVisible, isModifiable, isModified, isRequired, isRestricted, parseBoolean, preferenceChanged, removeFocusListener, removeValueChangeListener, requestFocus, seeHelpField, setBold, setDisabledbgcolor, setFont, setFontColor, setFontSize, setLabelFontColor, setModifiable, setParentForm, setRequired, setRequiredFieldBackground, setVisible, updateBackgroundColor, updateFont, updateTip, updateUI, validateComponentPositionsgetAccessibleContext, getUI, getUIClassID, paramString, setUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, 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, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, 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, transferFocusBackward, transferFocusUpCycleclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLabelComponentText, getSQLDataType, isHidden, isModifiable, isModified, isRequired, setModifiable, setRequiredgetConstraints, isEnabled, setVisiblegetTextsToTranslate, setComponentLocalegetAttributeinitPermissions, isRestrictedpublic static boolean toolBarFiller
protected static final String HTML_BASE
protected static final String TAB
protected int minFontSize
protected int maxFontSize
protected int fontSizeStep
protected boolean opaquebuttons
protected boolean borderbuttons
protected MouseListener listenerHighlightButtons
protected int lastSelectedFontSize
protected JPanel buttonsPanel
protected JComboBox fontSizeCombo
protected JComboBox paragraphCombo
protected JComboBox fontFamilyCombo
protected StyleContext context
protected HTMLEditorKit editor
protected String plainTextColumn
protected boolean advancedQueryMode
protected HTMLViewerAction htmlViewerAction
protected JMenu stylesMenu
protected JMenu tableMenu
protected ButtonGroup alignButtonGroup
protected org.bushe.swing.action.ActionList actionList
protected CaretListener caretHandler
protected FocusListener focusHandler
protected DocumentListener textChangedHandler
protected ActionListener paragraphComboHandler
protected ActionListener fontChangeHandler
protected ActionListener fontSizeChangeHandler
protected boolean isWysTextChanged
public static int defaultHTMLToolbarButtonHeight
protected int toolbarButtonHeight
public HTMLShefDataField(Hashtable parameters)
parameters - the Hashtable with parameterspublic void previousActionPerformed(ActionEvent e)
ActionPerformedListenerpreviousActionPerformed in interface ActionPerformedListenere - Eventpublic void postActionPerformed(ActionEvent e)
ActionPerformedListenerpostActionPerformed in interface ActionPerformedListenere - Eventprotected void registerUndoableListener()
registerUndoableListener in class MemoDataFieldprotected void registerUndoRedoActions()
registerUndoRedoActions in class MemoDataFieldprotected void registerKeystroke()
public void init(Hashtable params)
MemoDataFieldinit 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 createPopupMenu()
DataFieldcreatePopupMenu in class MemoDataFieldprotected void showPopupMenu(Component source, int x, int y)
DataFieldshowPopupMenu in class MemoDataFieldsource - the componentx - the x coordinatey - the y coordinatepublic void setResourceBundle(ResourceBundle res)
InternationalizationsetResourceBundle in interface InternationalizationsetResourceBundle in class MemoDataFieldres - the new language bundle.protected void translateJMenu(JMenu menu)
protected void createFontSizeCombo()
minFontSize to
maxFontSize.protected void createParagraphCombo()
protected void createFontFamilyCombo()
protected Action[] toArray(org.bushe.swing.action.ActionList lst)
lst - public void setEnabled(boolean en)
DataFieldsetEnabled in interface FormComponentsetEnabled in class DataFielden - the condition to set enableprotected void enableButtonsPanelComponents(boolean enabled)
protected void configureButtonsPanelAndEditor()
protected void addToolBarSeparator(JPanel buttonsPanel)
protected void configToolbarButton(AbstractButton button)
protected void changePanelButtons()
public void setValue(Object value)
DataComponentsetValue in interface DataComponentsetValue in class MemoDataFieldvalue - the object with value to setpublic void deleteData()
DataComponentdeleteData in interface DataComponentdeleteData in class MemoDataFieldpublic Object getValue()
DataComponentgetValue in interface DataComponentgetValue in class MemoDataFieldobject with value.protected void createDataField()
MemoDataFieldJComponent.processKeyEvent(KeyEvent)
method for managing focus.createDataField in class MemoDataFieldprotected void insertHTML(String html, int location)
protected void initializeHandlers()
protected void setTextFontSize(int offset,
int length,
int size)
public boolean isEmpty()
DataComponentisEmpty in interface DataComponentisEmpty in class MemoDataFieldtrue when component is emptypublic void setButtonPanelVisible(boolean v)
v - the condition about visibility panelpublic void setAdvancedQueryMode(boolean mode)
AdvancedDataComponentsetAdvancedQueryMode in interface AdvancedDataComponentmode - the condition to enable this statepublic int getTemplateDataType()
ITemplateFieldITemplateField.DATA_TYPE_FIELD ITemplateField.DATA_TYPE_IMAGE
ITemplateField.DATA_TYPE_TABLEgetTemplateDataType in interface ITemplateFieldint with the data type.public Object getTemplateDataValue()
getTemplateDataValue in interface ITemplateFieldprotected void updateState()
protected void updateState(CaretEvent e)
protected Font getSelectedTextFont(int offset, int length)
Copyright © 2016 Imatia Innovation S.L.. All rights reserved.