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

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,F>
Type Parameters:
T - the entity type
F - the actual class of this field
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class AbstractEntityJTextField<T,F>
extends 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
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  JpaEntitySearchButton<T> iJpaEntitySearchButton
           
protected  JTextField<T> iJTextField
           
protected  ImageButton iJumpButton
           
static String VALUE_PROPERTY_ID
           
static String WHERECLAUSE_PROPERTY_ID
           
static 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, Class entityClass, String prefix)
           
 
Method Summary
 Class getEntityClass()
          EntityClass
 JTextField getJTextField()
           
 boolean getJumpButtonVisible()
           
 String getPath()
           
 String getToolTipText()
           
 T getValue()
           
 String getWhereclause()
          Whereclause: use <*> for the entity, like "<*>.iIsbilling = true"
 nl.knowledgeplaza.util.LinearMap<String,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(Class value)
           
 void setJumpButtonVisible(boolean value)
          JumpButtonVisible
 void setPath(String value)
          path
 void setSearchButtonVisible(boolean value)
          SearchButtonVisible
 void setToolTipText(String value)
          ToolTipText
 void setValue(T value)
          Value
 void setWhereclause(String value)
           
 void setWhereclauseParameters(nl.knowledgeplaza.util.LinearMap<String,Object> value)
           
 F withEditable(boolean value)
           
 F withEnabled(boolean value)
           
 F withEntityClass(Class value)
           
 F withJumpButtonVisible(boolean value)
           
 F withPath(String value)
           
 F withSearchButtonVisible(boolean value)
           
 F withToolTipText(String value)
           
 F withValue(T value)
           
 F withWhereclause(String value)
           
 F withWhereclauseParameters(nl.knowledgeplaza.util.LinearMap<String,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, 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, 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 String VALUE_PROPERTY_ID
See Also:
Constant Field Values

WHERECLAUSE_PROPERTY_ID

public static final String WHERECLAUSE_PROPERTY_ID
See Also:
Constant Field Values

WHERECLAUSEPARAMETERS_PROPERTY_ID

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

AbstractEntityJTextField

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

getJTextField

public JTextField getJTextField()

requestFocusInWindow

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

Overrides:
requestFocusInWindow in class JComponent

jump

protected void jump()
quicksearch


getEntityClass

public Class getEntityClass()
EntityClass


withEntityClass

public F withEntityClass(Class value)

setEntityClass

public void setEntityClass(Class value)

setValue

public void setValue(T value)
Value


withValue

public F withValue(T value)

getValue

public T getValue()

setEditable

public void setEditable(boolean value)
Editable


withEditable

public F withEditable(boolean value)

isEditable

public boolean isEditable()

setEnabled

public void setEnabled(boolean value)
Enabled

Overrides:
setEnabled in class JComponent

withEnabled

public F withEnabled(boolean value)

isEnabled

public boolean isEnabled()
Overrides:
isEnabled in class Component

setToolTipText

public void setToolTipText(String value)
ToolTipText

Overrides:
setToolTipText in class JComponent

withToolTipText

public F withToolTipText(String value)

getToolTipText

public String getToolTipText()
Overrides:
getToolTipText in class JComponent

setPath

public void setPath(String value)
path


withPath

public F withPath(String value)

getPath

public String getPath()

setJumpButtonVisible

public void setJumpButtonVisible(boolean value)
JumpButtonVisible


withJumpButtonVisible

public F withJumpButtonVisible(boolean value)

getJumpButtonVisible

public boolean getJumpButtonVisible()

setSearchButtonVisible

public void setSearchButtonVisible(boolean value)
SearchButtonVisible


withSearchButtonVisible

public F withSearchButtonVisible(boolean value)

isSearchButtonVisible

public boolean isSearchButtonVisible()

getWhereclause

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


setWhereclause

public void setWhereclause(String value)

withWhereclause

public F withWhereclause(String value)

getWhereclauseParameters

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


setWhereclauseParameters

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

withWhereclauseParameters

public F withWhereclauseParameters(nl.knowledgeplaza.util.LinearMap<String,Object> value)


Copyright © 2012 KnowledgePlaza. All Rights Reserved.