org.tbee.swing.jpa
Class AbstractEntityJTextField<T>

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.tbee.swing.jpa.AbstractEntityJTextField<T>
Type Parameters:
T -
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class AbstractEntityJTextField<T>
extends javax.swing.JPanel

A JTextField with a search button and an optional zoom button. A whereclause can be set to limit the result.

Author:
user
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  JpaEntitySearchButton<T> iJpaEntitySearchButton
           
protected  JTextField<T> iJTextField
           
protected  ImageButton iJumpButton
           
static java.lang.String VALUE_PROPERTY_ID
           
static java.lang.String WHERECLAUSE_PROPERTY_ID
           
static java.lang.String WHERECLAUSEPARAMETERS_PROPERTY_ID
           
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AbstractEntityJTextField(JTextField<T> textfield, java.lang.Class entityClass, java.lang.String prefix)
           
 
Method Summary
 java.lang.Class getEntityClass()
          EntityClass
 boolean getJumpButtonVisible()
           
 java.lang.String getPath()
           
 T getValue()
           
 java.lang.String getWhereclause()
          Whereclause: use <*> for the entity, like "<*>.iIsbilling = true"
 nl.knowledgeplaza.util.LinearMap<java.lang.String,java.lang.Object> getWhereclauseParameters()
          WhereclauseParameters:
 boolean isEditable()
           
 boolean isEnabled()
           
 boolean isSearchButtonVisible()
           
protected  void jump()
          quicksearch
 boolean requestFocusInWindow()
          focus requests are redirected to the textfield
 void setEditable(boolean value)
          Editable
 void setEnabled(boolean value)
          Enabled
 void setEntityClass(java.lang.Class value)
           
 void setJumpButtonVisible(boolean value)
          JumpButtonVisible
 void setPath(java.lang.String value)
          path
 void setSearchButtonVisible(boolean value)
          SearchButtonVisible
 void setValue(T value)
          Value
 void setWhereclause(java.lang.String value)
           
 void setWhereclauseParameters(nl.knowledgeplaza.util.LinearMap<java.lang.String,java.lang.Object> value)
           
 AbstractEntityJTextField<T> withEditable(boolean value)
           
 AbstractEntityJTextField<T> withEnabled(boolean value)
           
 AbstractEntityJTextField<T> withEntityClass(java.lang.Class value)
           
 AbstractEntityJTextField<T> withJumpButtonVisible(boolean value)
           
 AbstractEntityJTextField<T> withPath(java.lang.String value)
           
 AbstractEntityJTextField<T> withSearchButtonVisible(boolean value)
           
 AbstractEntityJTextField<T> withValue(T value)
           
 AbstractEntityJTextField<T> withWhereclause(java.lang.String value)
           
 AbstractEntityJTextField<T> withWhereclauseParameters(nl.knowledgeplaza.util.LinearMap<java.lang.String,java.lang.Object> value)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, 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, 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
 
Methods inherited from class java.awt.Container
add, 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, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, 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, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

iJumpButton

protected ImageButton iJumpButton

iJTextField

protected JTextField<T> iJTextField

iJpaEntitySearchButton

protected JpaEntitySearchButton<T> iJpaEntitySearchButton

VALUE_PROPERTY_ID

public static final java.lang.String VALUE_PROPERTY_ID
See Also:
Constant Field Values

WHERECLAUSE_PROPERTY_ID

public static final java.lang.String WHERECLAUSE_PROPERTY_ID
See Also:
Constant Field Values

WHERECLAUSEPARAMETERS_PROPERTY_ID

public static final java.lang.String WHERECLAUSEPARAMETERS_PROPERTY_ID
See Also:
Constant Field Values
Constructor Detail

AbstractEntityJTextField

public AbstractEntityJTextField(JTextField<T> textfield,
                                java.lang.Class entityClass,
                                java.lang.String prefix)
Method Detail

requestFocusInWindow

public boolean requestFocusInWindow()
focus requests are redirected to the textfield

Overrides:
requestFocusInWindow in class javax.swing.JComponent

jump

protected void jump()
quicksearch


getEntityClass

public java.lang.Class getEntityClass()
EntityClass


withEntityClass

public AbstractEntityJTextField<T> withEntityClass(java.lang.Class value)

setEntityClass

public void setEntityClass(java.lang.Class value)

setValue

public void setValue(T value)
Value


withValue

public AbstractEntityJTextField<T> withValue(T value)

getValue

public T getValue()

setEditable

public void setEditable(boolean value)
Editable


withEditable

public AbstractEntityJTextField<T> withEditable(boolean value)

isEditable

public boolean isEditable()

setEnabled

public void setEnabled(boolean value)
Enabled

Overrides:
setEnabled in class javax.swing.JComponent

withEnabled

public AbstractEntityJTextField<T> withEnabled(boolean value)

isEnabled

public boolean isEnabled()
Overrides:
isEnabled in class java.awt.Component

setPath

public void setPath(java.lang.String value)
path


withPath

public AbstractEntityJTextField<T> withPath(java.lang.String value)

getPath

public java.lang.String getPath()

setJumpButtonVisible

public void setJumpButtonVisible(boolean value)
JumpButtonVisible


withJumpButtonVisible

public AbstractEntityJTextField<T> withJumpButtonVisible(boolean value)

getJumpButtonVisible

public boolean getJumpButtonVisible()

setSearchButtonVisible

public void setSearchButtonVisible(boolean value)
SearchButtonVisible


withSearchButtonVisible

public AbstractEntityJTextField<T> withSearchButtonVisible(boolean value)

isSearchButtonVisible

public boolean isSearchButtonVisible()

getWhereclause

public java.lang.String getWhereclause()
Whereclause: use <*> for the entity, like "<*>.iIsbilling = true"


setWhereclause

public void setWhereclause(java.lang.String value)

withWhereclause

public AbstractEntityJTextField<T> withWhereclause(java.lang.String value)

getWhereclauseParameters

public nl.knowledgeplaza.util.LinearMap<java.lang.String,java.lang.Object> getWhereclauseParameters()
WhereclauseParameters:


setWhereclauseParameters

public void setWhereclauseParameters(nl.knowledgeplaza.util.LinearMap<java.lang.String,java.lang.Object> value)

withWhereclauseParameters

public AbstractEntityJTextField<T> withWhereclauseParameters(nl.knowledgeplaza.util.LinearMap<java.lang.String,java.lang.Object> value)


Copyright © 2010 KnowledgePlaza. All Rights Reserved.