public class Form2HTMLDataField extends IdentifiedAbstractFormComponent implements DataComponent, ActionListener, Internationalization, ValueChangeDataComponent
init(Hashtable)JComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategyattribute, enabledPermission, parentForm, restricted, visiblePermissiondefaultBottomMargin, defaultLeftMargin, defaultRightMargin, defaultTopMarginaccessibleContext, 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_ALIGNMENTCOMP_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_2DESACTIVATE_COMPONENT_BY_PERMISSION_TIPABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
Form2HTMLDataField(Hashtable parameters)
This field transform an Ontimize Form in a HTML Form that can be view in
a web browser.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent e) |
void |
addValueChangeListener(ValueChangeListener l) |
protected String |
appendString(String base,
String toFind,
String toADD) |
protected void |
applyXSL() |
protected String |
createHTML() |
void |
deleteData()
The method to delete data for component.
|
static String |
fileToString(InputStream is) |
protected void |
fireValueChanged(Object newValue,
Object oldValue,
int type) |
Object |
getConstraints(LayoutManager arg0)
Description method to return the
constraints component to
place correctly in parent container. |
String |
getLabelComponentText()
Returns the label text component.
|
int |
getSQLDataType()
Returns the
sql data type according to
java.sql.Types
|
Object |
getValue()
Gets the value of a component.
|
void |
init(Hashtable parameters)
Initializes parameters.
|
boolean |
isEmpty()
Checks the data existence in component.
|
boolean |
isHidden()
Indicates to check the visibility condition for a component.
|
boolean |
isModifiable()
Checks the modifiable condition for a component.
|
boolean |
isModified()
This method should be return
true when data have been
modified. |
boolean |
isRequired()
Indicates the required condition for a component.
|
protected void |
openInBrowser() |
void |
removeValueChangeListener(ValueChangeListener l) |
void |
setEnabled(boolean enabled)
Description method to set enabled or not the component according the
boolean condition in parameter.
|
void |
setModifiable(boolean modifiable)
Establishes the modifiable condition for a component.
|
void |
setRequired(boolean required)
Sets required a component according to condition.
|
void |
setResourceBundle(ResourceBundle resourceBundle)
Sets the language resource bundle.
|
void |
setValue(Object value)
Sets the value for component.
|
checkEnabledPermission, checkVisiblePermission, getAttribute, getParentForm, initPermissions, isRestricted, setParentFormgetTextsToTranslate, setComponentLocaleaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUIadd, 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, addFocusListener, 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, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, 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, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisEnabled, setVisiblegetAttributeinitPermissions, isRestrictedpublic static final String XSL_LIST_TAG
public static final String XSL_PARAMETERS_TAG
public static final String XML_FIELD_ATTR_TAG
public static final String HTML_VIEWER_TAG
public static final String CSS_TAG
public static final String PATTERN_TAG
public static final String HTML_TITLE_TAG
public static final String HTML_VIEWER_TITLE_TAG
public static final String XSL_LABEL_TAG
public static final String PATTERN_STYLE_TAG
public static final String PATTERN_BODY_TAG
public static final String DEFAULT_HTML_PATTERN
public static final String RELOAD_TEXT
public static final String APPLY_TEXT
public static final String NAVIGATOR_TEXT
public static final String ZOOM_IN_TEXT
public static final String ZOOM_OUT_TEXT
public static final String SHOW_RIGHT_TEXT
public static final String ERROR_XSL_NOT_VALID
public static final String ERROR_APPLYING_XSL
protected boolean modifiable
protected boolean required
protected boolean fireValueEvents
protected String valueSave
protected List valueListener
protected JButton reload
protected JButton apply
protected JButton navigator
protected JButton zoomIn
protected JButton zoomOut
protected JButton right
protected BasicHTMLViewer viewer
protected JComboBox xslList
protected Hashtable xslParameters
protected XMLTextPane html
protected String xmlFieldAttr
protected String cssContentFile
protected String patternContentFile
protected String htmlTitle
protected String htmlViewerTitle
protected String xslLabel
protected JComponent menuComponent
protected JLabel jlXSLLabel
protected JPanel htmlEditorPanel
protected ResourceBundle resourceBundle
protected Vector xslListValues
protected TransformerFactory tFactory
protected Transformer transformer
public Form2HTMLDataField(Hashtable parameters)
xsl selected to the content, and stores the
result in the component or in the parameters - The Hashtable with parameterspublic Object getConstraints(LayoutManager arg0)
FormComponentconstraints component to
place correctly in parent container.
getConstraints in interface FormComponentgetConstraints in class AbstractFormComponentarg0 - the parent container referencepublic void init(Hashtable parameters)
init in interface FormComponentinit in class IdentifiedAbstractFormComponentparameters - the Hashtable with parameters. Adds the next
parameters:
| attribute | values | default | required | meaning |
| attr | yes | attr of field | ||
| xmlFieldAttr | no | attr of the field where is stored the XML Form and which will be used for the transformations | ||
| htmlTitle | no | The text that will appear in the border of the HTML Field | ||
| htmlViewerTitle | no | The text that will appear in the border of the HTML Viewer Field | ||
| xslLabel | no | The text that will appear in the component | ||
| xslList | package.filename1.xsl;package.filename2.xsl;... | no | List of the XSL files that can be used form transform the XML File | |
| xslParameters | param1=value1;param2=value2;... | no | List of parameters=values that will be applied to all XSL transformations | |
| htmlViewer | no | Name of the class that will be used as a HTML Viewer | ||
| css | no | Name of the css file that will used by the viewer | ||
| pattern | no | Name of the pattern file that will used by the viewer |
public void setEnabled(boolean enabled)
FormComponentsetEnabled in interface FormComponentsetEnabled in class JComponentenabled - the enabled conditionpublic void setResourceBundle(ResourceBundle resourceBundle)
InternationalizationsetResourceBundle in interface InternationalizationsetResourceBundle in class AbstractFormComponentresourceBundle - the new language bundle.public String getLabelComponentText()
DataComponentLocale.
getLabelComponentText in interface DataComponentpublic int getSQLDataType()
DataComponentsql data type according to
java.sql.Types
getSQLDataType in interface DataComponentInteger typepublic boolean isEmpty()
DataComponentisEmpty in interface DataComponenttrue when component is emptypublic boolean isHidden()
DataComponentisHidden in interface DataComponentpublic boolean isModifiable()
DataComponentisModifiable in interface DataComponenttrue when component is modifiablepublic boolean isModified()
DataComponenttrue when data have been
modified. The method setValue() should be change this
condition.
isModified in interface DataComponentpublic boolean isRequired()
DataComponentisRequired in interface DataComponentpublic void setModifiable(boolean modifiable)
DataComponentDeleteFields call.
setModifiable in interface DataComponentmodifiable - the boolean conditionpublic void setRequired(boolean required)
DataComponentsetRequired in interface DataComponentrequired - the required conditionpublic void setValue(Object value)
DataComponentsetValue in interface DataComponentvalue - the object with value to setpublic Object getValue()
DataComponentgetValue in interface DataComponentobject with value.public void deleteData()
DataComponentdeleteData in interface DataComponentpublic void addValueChangeListener(ValueChangeListener l)
addValueChangeListener in interface ValueChangeDataComponentpublic void removeValueChangeListener(ValueChangeListener l)
removeValueChangeListener in interface ValueChangeDataComponentpublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerprotected String createHTML()
protected void openInBrowser()
protected void applyXSL()
public static String fileToString(InputStream is)
Copyright © 2016 Imatia Innovation S.L.. All rights reserved.