|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
com.imagero.gui.swing.ComponentRenderer
ComponentRenderer can rotate (90, 180, 270) any JComponent (except those which are using CellRenderer to paint itself)
| Nested Class Summary | |
protected class |
ComponentRenderer.MouseHandler
|
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
| 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 | |
protected |
ComponentRenderer()
|
|
ComponentRenderer(javax.swing.JComponent c)
|
|
ComponentRenderer(javax.swing.JComponent c,
javax.swing.CellRendererPane crp)
|
| Method Summary | |
boolean |
contains(int x,
int y)
Gives the UI delegate an opportunity to define the precise shape of this component for the sake of mouse processing. |
protected javax.swing.CellRendererPane |
createRendererPane()
|
protected void |
dispatchToRenderer(javax.swing.JComponent c,
java.awt.AWTEvent e)
|
float |
getAlpha()
|
int |
getAxis()
|
javax.swing.JComponent |
getComponent()
|
protected java.awt.AlphaComposite |
getComposite()
|
java.awt.Dimension |
getMaximumSize()
If the maximum size has been set to a non- null value
just returns it. |
java.awt.Dimension |
getMinimumSize()
If the minimum size has been set to a non- null value
just returns it. |
protected ComponentRenderer.MouseHandler |
getMouseHandler()
|
java.awt.Dimension |
getPreferredSize()
If the preferredSize has been set to a
non-null value just returns it.
|
java.lang.String |
getToolTipText()
Returns the tooltip string that has been set with setToolTipText. |
boolean |
isBorderPainted()
|
boolean |
isClockwise()
|
boolean |
isContentPainted()
|
boolean |
isIgnoreMouse()
|
boolean |
isUseAlpha()
|
static void |
main(java.lang.String[] args)
|
protected void |
paintBorder(java.awt.Graphics g)
Paints the component's border. |
void |
paintComponent(java.awt.Graphics g)
Calls the UI delegate's paint method, if the UI delegate is non- null. |
protected void |
registerComponent()
|
void |
setAlpha(float alpha)
|
void |
setAxis(int axis)
|
void |
setBorderPainted(boolean borderPainted)
|
protected void |
setCellRendererPane(javax.swing.CellRendererPane crp)
|
void |
setClockwise(boolean clockwise)
|
void |
setComposite(java.awt.AlphaComposite composite)
|
void |
setContentPainted(boolean contentPainted)
|
void |
setIgnoreMouse(boolean ignoreMouse)
|
protected void |
setRenderer(javax.swing.JComponent c)
|
void |
setUseAlpha(boolean useAlpha)
|
void |
showToolTip(boolean show)
|
protected void |
unregisterComponent()
|
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, list, list, paintComponents, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getSize, getToolkit, getTreeLock, hasFocus, imageUpdate, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, list, list, list, paintAll, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected ComponentRenderer()
public ComponentRenderer(javax.swing.JComponent c)
public ComponentRenderer(javax.swing.JComponent c,
javax.swing.CellRendererPane crp)
| Method Detail |
public boolean contains(int x,
int y)
javax.swing.JComponent
Component.contains(int, int),
ComponentUIprotected javax.swing.CellRendererPane createRendererPane()
protected void dispatchToRenderer(javax.swing.JComponent c,
java.awt.AWTEvent e)
public float getAlpha()
public int getAxis()
public javax.swing.JComponent getComponent()
protected java.awt.AlphaComposite getComposite()
public java.awt.Dimension getMaximumSize()
javax.swing.JComponentnull value
just returns it. If the UI delegate's getMaximumSize
method returns a non-null value then return that;
otherwise defer to the component's layout manager.
maximumSize propertyJComponent.setMaximumSize(java.awt.Dimension),
ComponentUIpublic java.awt.Dimension getMinimumSize()
javax.swing.JComponentnull value
just returns it. If the UI delegate's getMinimumSize
method returns a non-null value then return that; otherwise
defer to the component's layout manager.
minimumSize propertyJComponent.setMinimumSize(java.awt.Dimension),
ComponentUIprotected ComponentRenderer.MouseHandler getMouseHandler()
public java.awt.Dimension getPreferredSize()
javax.swing.JComponentpreferredSize has been set to a
non-null value just returns it.
If the UI delegate's getPreferredSize
method returns a non null value then return that;
otherwise defer to the component's layout manager.
preferredSize propertyJComponent.setPreferredSize(java.awt.Dimension),
ComponentUIpublic java.lang.String getToolTipText()
javax.swing.JComponentsetToolTipText.
JComponent.TOOL_TIP_TEXT_KEYpublic boolean isBorderPainted()
public boolean isClockwise()
public boolean isContentPainted()
public boolean isIgnoreMouse()
public boolean isUseAlpha()
public static void main(java.lang.String[] args)
protected void paintBorder(java.awt.Graphics g)
javax.swing.JComponent
If you override this in a subclass you should not make permanent
changes to the passed in Graphics. For example, you
should not alter the clip Rectangle or modify the
transform. If you need to do these operations you may find it
easier to create a new Graphics from the passed in
Graphics and manipulate it.
g - the Graphics context in which to paintJComponent.paint(java.awt.Graphics),
JComponent.setBorder(javax.swing.border.Border)public void paintComponent(java.awt.Graphics g)
javax.swing.JComponentnull. We pass the delegate a copy of the
Graphics object to protect the rest of the
paint code from irrevocable changes
(for example, Graphics.translate).
If you override this in a subclass you should not make permanent
changes to the passed in Graphics. For example, you
should not alter the clip Rectangle or modify the
transform. If you need to do these operations you may find it
easier to create a new Graphics from the passed in
Graphics and manipulate it. Further, if you do not
invoker super's implementation you must honor the opaque property,
that is
if this component is opaque, you must completely fill in the background
in a non-opaque color. If you do not honor the opaque property you
will likely see visual artifacts.
g - the Graphics object to protectJComponent.paint(java.awt.Graphics),
ComponentUIprotected void registerComponent()
public void setAlpha(float alpha)
public void setAxis(int axis)
public void setBorderPainted(boolean borderPainted)
protected void setCellRendererPane(javax.swing.CellRendererPane crp)
public void setClockwise(boolean clockwise)
public void setComposite(java.awt.AlphaComposite composite)
public void setContentPainted(boolean contentPainted)
public void setIgnoreMouse(boolean ignoreMouse)
protected void setRenderer(javax.swing.JComponent c)
public void setUseAlpha(boolean useAlpha)
public void showToolTip(boolean show)
protected void unregisterComponent()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||