public class EntityResultViewer extends JPanel implements DataComponent, AccessForm
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected Object |
attribute
The reference to attribute.
|
protected BooleanCellRenderer |
booleanRenderer
A reference to a boolean cell renderer.
|
protected JPanel |
controlPanel
An instance of a control panel.
|
protected String |
copyClipboardKey
The key to copy to clipboard the tip.
|
protected JMenuItem |
copyMenu
A instance of the copy menu item.
|
protected DateCellRenderer |
dateRenderer
A reference to date renderer.
|
protected FormPermission |
enabledPermission
The enabled permission reference.
|
protected HeadCellRenderer |
headerRenderer
A reference to a header renderer.
|
protected ExtImageCellRenderer |
imageRenderer
A reference to an image renderer.
|
protected MouseAdapter |
listMouseListener |
protected ObjectCellRenderer |
objectRenderer
A reference to a object renderer.
|
protected Form |
parentForm
The reference to parent form.
|
protected ExtendedJPopupMenu |
popup
An instance of pop-up menu.
|
protected RealCellRenderer |
realRenderer
A reference to a real cell renderer.
|
protected JButton |
reportButton
A reference to report button.
|
protected ResourceBundle |
resources
A reference to resources file.
|
protected boolean |
restricted |
protected RowHeadCellRenderer |
rowHeaderRenderer
The reference to a row header renderer.
|
protected JTable |
table
An instance of the table.
|
protected FormPermission |
visiblePermission
The visible permission reference.
|
accessibleContext, 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_2DEBUG_LANGUAGEDESACTIVATE_COMPONENT_BY_PERMISSION_TIPABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
EntityResultViewer(Hashtable parameters)
The class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTableHeaderMouseListener(JTable table)
Adds a default mouse listener to the table header and configures the
table header rendering.
|
protected boolean |
checkEnabledPermission()
Checks the enabled permission.
|
protected boolean |
checkVisiblePermission()
Checks the visible permission condition.
|
protected void |
copyClipboard()
Implements the copy-to-clipboard operation.
|
void |
deleteData()
The method to delete data for component.
|
Object |
getAttribute()
Gets the object attribute.
|
Object |
getConstraints(LayoutManager parentLayout)
Description method to return the
constraints component to
place correctly in parent container. |
String |
getExcelString()
Gets the string with all table components (Columns separated by \t and
rows by \n).
|
String |
getLabelComponentText()
Returns the label text component.
|
protected TableColumn |
getResizingColumn(JTableHeader header,
Point point,
int columnIndex)
Compares the point with the header of the column specified by the
columnIndex.
|
int |
getSQLDataType()
Returns the
sql data type according to
java.sql.Types
|
protected TableModel |
getTableModel(EntityResult res)
Gets the table model for the entity result.
|
Vector |
getTextsToTranslate()
Returns all the texts in the element suitable for being translated.
|
Object |
getValue()
Gets the value of a component.
|
void |
init(Hashtable parameters)
Initializes parameters.
|
void |
initPermissions() |
protected void |
installPopup()
Installs the copy to clipboard menu.
|
protected void |
installReportButton()
Installs the report button.
|
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.
|
boolean |
isRestricted() |
void |
setComponentLocale(Locale l) |
void |
setEnabled(boolean e)
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 |
setModified(boolean modifiable)
Empty method.
|
void |
setParentForm(Form f)
Method declaration to set the form that contains the component.
|
protected void |
setRenderers()
Creates instances of all defined renderer and sets them to the table.
|
void |
setRequired(boolean required)
Sets required a component according to condition.
|
void |
setResourceBundle(ResourceBundle resources)
Sets the language resource bundle.
|
void |
setValue(Object value)
Sets the value for component.
|
void |
showCustomReportsWindow()
Shows the report window.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, getPreferredSize, 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, 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, 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, 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, setVisibleprotected JTable table
protected Object attribute
protected FormPermission visiblePermission
protected FormPermission enabledPermission
protected Form parentForm
protected DateCellRenderer dateRenderer
protected RowHeadCellRenderer rowHeaderRenderer
protected BooleanCellRenderer booleanRenderer
protected RealCellRenderer realRenderer
protected ObjectCellRenderer objectRenderer
protected ExtImageCellRenderer imageRenderer
protected HeadCellRenderer headerRenderer
protected ExtendedJPopupMenu popup
protected String copyClipboardKey
protected JMenuItem copyMenu
protected JPanel controlPanel
protected JButton reportButton
protected ResourceBundle resources
protected boolean restricted
protected MouseAdapter listMouseListener
public EntityResultViewer(Hashtable parameters)
super(), initializes
parameters, sets renderer and installs pop-up and report button.
parameters - the Hashtable with parametersprotected void installReportButton()
protected void installPopup()
protected void copyClipboard()
public String getExcelString()
protected void setRenderers()
public void init(Hashtable parameters)
init in interface FormComponentparameters - the Hashtable with parameters.
| attribute | values | default | required | meaning |
| attr | no | The attribute for component. |
public Object getAttribute()
IdentifiedElementgetAttribute in interface IdentifiedElementpublic boolean isRestricted()
isRestricted in interface SecureElementpublic void initPermissions()
initPermissions in interface SecureElementprotected boolean checkVisiblePermission()
protected boolean checkEnabledPermission()
protected TableModel getTableModel(EntityResult res)
res - the entity resultpublic void addTableHeaderMouseListener(JTable table)
table - the table which header will have the listenerprotected TableColumn getResizingColumn(JTableHeader header, Point point, int columnIndex)
header - the table headerpoint - a point coming from a mouse eventcolumnIndex - the columnIndex to compare return the TableColumn
corresponding to the columnIndex in case the mouse event was
performed into the column header; null otherwisepublic Object getConstraints(LayoutManager parentLayout)
FormComponentconstraints component to
place correctly in parent container.
getConstraints in interface FormComponentparentLayout - the parent container referencepublic Vector getTextsToTranslate()
InternationalizationgetTextsToTranslate in interface Internationalizationpublic void setResourceBundle(ResourceBundle resources)
InternationalizationsetResourceBundle in interface Internationalizationresources - the new language bundle.public void setComponentLocale(Locale l)
setComponentLocale in interface Internationalizationpublic String getLabelComponentText()
DataComponentLocale.
getLabelComponentText in interface DataComponentpublic Object getValue()
DataComponentgetValue in interface DataComponentobject with value.public void setValue(Object value)
DataComponentsetValue in interface DataComponentvalue - the object with value to setpublic void deleteData()
DataComponentdeleteData in interface DataComponentpublic boolean isEmpty()
DataComponentisEmpty in interface DataComponenttrue when component is emptypublic 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 setRequired(boolean required)
DataComponentsetRequired in interface DataComponentrequired - the required conditionpublic boolean isHidden()
DataComponentisHidden in interface DataComponentpublic void setModifiable(boolean modifiable)
DataComponentDeleteFields call.
setModifiable in interface DataComponentmodifiable - the boolean conditionpublic int getSQLDataType()
DataComponentsql data type according to
java.sql.Types
getSQLDataType in interface DataComponentInteger typepublic void setModified(boolean modifiable)
modifiable - the modified conditionpublic void setParentForm(Form f)
AccessFormsetParentForm in interface AccessFormf - the form referencepublic void setEnabled(boolean e)
FormComponentsetEnabled in interface FormComponentsetEnabled in class JComponente - the enabled conditionpublic void showCustomReportsWindow()
Copyright © 2016 Imatia Innovation S.L.. All rights reserved.