|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--OME.ImageTable
This class serves to cache images and it also provides simple manipulations of those images such as scalings and rotations.
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
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 |
Constructor Summary | |
ImageTable()
Constructs the image table. |
Method Summary | |
java.awt.Image |
drawDashedHLine(java.awt.Image im)
Draws a dashed horizontal line through through an image, and returns the result. |
java.awt.Image |
drawHLine(java.awt.Image im)
Draws a horizontal line through through an image, and returns the result. |
int |
getHeight(java.awt.Image i)
Gets the height of an image. |
java.awt.Image |
getImage(java.lang.Object handle)
Returns the image with the handle. |
java.awt.Image |
getRotation(java.awt.Image image,
float rotation)
Return the image with specified image and rotation (loading it from the scaleTable, if it exists in scaleTable, otherwise creating it and adding it to the scaleTable). |
java.awt.Image |
getScaling(java.awt.Image image,
double scale)
Return the specified image and size (loading it from the scaleTable, if it exists in scaleTable, otherwise creating it and adding it to the scaleTable). |
java.awt.Image |
getScaling(java.awt.Image image,
double widthfactor,
double heightfactor)
Return the specified image and size (loading it from the scaleTable, if it exists in scaleTable, otherwise creating it and adding it to the scaleTable). |
java.awt.Image |
getSizing(java.awt.Image im,
int width,
int height)
Returns a rescaled version of the specified image to the specified height or width. |
int |
getWidth(java.awt.Image i)
Gets the width of an image. |
java.awt.Image |
putImage(java.lang.String filename,
java.lang.Object handle)
Stores the image into the cache with the passed handle. |
Methods inherited from class javax.swing.JComponent |
addAncestorListener,
addNotify,
addPropertyChangeListener,
addPropertyChangeListener,
addVetoableChangeListener,
computeVisibleRect,
contains,
createToolTip,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
fireVetoableChange,
getAccessibleContext,
getActionForKeyStroke,
getAlignmentX,
getAlignmentY,
getAutoscrolls,
getBorder,
getBounds,
getClientProperty,
getComponentGraphics,
getConditionForKeyStroke,
getDebugGraphicsOptions,
getGraphics,
getHeight,
getInsets,
getInsets,
getLocation,
getMaximumSize,
getMinimumSize,
getNextFocusableComponent,
getPreferredSize,
getRegisteredKeyStrokes,
getRootPane,
getSize,
getToolTipLocation,
getToolTipText,
getToolTipText,
getTopLevelAncestor,
getUIClassID,
getVisibleRect,
getWidth,
getX,
getY,
grabFocus,
hasFocus,
isDoubleBuffered,
isFocusCycleRoot,
isFocusTraversable,
isLightweightComponent,
isManagingFocus,
isOpaque,
isOptimizedDrawingEnabled,
isPaintingTile,
isRequestFocusEnabled,
isValidateRoot,
paint,
paintBorder,
paintChildren,
paintComponent,
paintImmediately,
paintImmediately,
paramString,
print,
printAll,
processComponentKeyEvent,
processFocusEvent,
processKeyEvent,
processMouseMotionEvent,
putClientProperty,
registerKeyboardAction,
registerKeyboardAction,
removeAncestorListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
removeVetoableChangeListener,
repaint,
repaint,
requestDefaultFocus,
requestFocus,
resetKeyboardActions,
reshape,
revalidate,
scrollRectToVisible,
setAlignmentX,
setAlignmentY,
setAutoscrolls,
setBackground,
setBorder,
setDebugGraphicsOptions,
setDoubleBuffered,
setEnabled,
setFont,
setForeground,
setMaximumSize,
setMinimumSize,
setNextFocusableComponent,
setOpaque,
setPreferredSize,
setRequestFocusEnabled,
setToolTipText,
setUI,
setVisible,
unregisterKeyboardAction,
update,
updateUI |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setLayout,
validate,
validateTree |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
getBackground,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getToolkit,
getTreeLock,
gotFocus,
handleEvent,
hide,
imageUpdate,
inside,
isDisplayable,
isEnabled,
isLightweight,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
processComponentEvent,
processInputMethodEvent,
processMouseEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
repaint,
repaint,
repaint,
resize,
resize,
setBounds,
setBounds,
setComponentOrientation,
setDropTarget,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public ImageTable()
Method Detail |
public java.awt.Image getScaling(java.awt.Image image, double scale)
image
- the image requiredscale
- the scale factor needed for the imagepublic java.awt.Image getScaling(java.awt.Image image, double widthfactor, double heightfactor)
image
- the image requiredwidthfactor
- width multiple desiredheightfactor
- height multiple desiredpublic java.awt.Image getSizing(java.awt.Image im, int width, int height)
im
- the image which should be rescaledwidth
- the width of the rescaled imageheight
- the height of the rescaled imagepublic java.awt.Image getRotation(java.awt.Image image, float rotation)
image
- the image to be scaledrotation
- the rotation needed for the imagepublic java.awt.Image getImage(java.lang.Object handle)
public java.awt.Image putImage(java.lang.String filename, java.lang.Object handle)
filename
- a possible handle for the imagehandle
- an alternative handle to be used, if one chooses not to
use the filanem as the handle.public int getWidth(java.awt.Image i)
image
- the image whose width we wantpublic int getHeight(java.awt.Image i)
image
- the image whose height we wantpublic java.awt.Image drawHLine(java.awt.Image im)
im
- the image which the horizontal line should be drawn throughpublic java.awt.Image drawDashedHLine(java.awt.Image im)
im
- the image which the dashed horizontal line should be drawn
through.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |