oracle.forms.fd
Class ImageSpinner

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 oracle.forms.fd.ImageSpinner
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class ImageSpinner
extends javax.swing.JPanel

A component to show images in a JSpinner

Version:
1.3
Author:
Francois Degrelle
See Also:
Serialized Form

Nested Class Summary
(package private)  class ImageSpinner.objImage
          Object to store images properties
(package private)  class ImageSpinner.SpinEditor
          JLabel to show the spinner content
 
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
(package private)  boolean bBorder
           
(package private)  java.awt.image.BufferedImage bi
           
(package private)  byte[] bImage
           
(package private)  boolean bImgMagnifier
           
(package private)  boolean bKeepImageSize
           
(package private)  boolean bLegend
           
(package private)  boolean bMustScale
           
(package private)  javax.swing.border.Border border
           
(package private)  boolean bTrsp
           
(package private)  java.awt.Color cButtonColor
           
(package private)  java.awt.Color cCanvasColor
           
(package private)  java.awt.Color cLegendBG
           
(package private)  java.awt.Color cLegendFG
           
(package private)  java.awt.Color cPanel
           
(package private)  DrawLAF dBean
           
(package private)  javax.swing.border.Border emptyborder
           
(package private)  java.io.InputStream fis
           
(package private)  int iCurrentImageIndice
           
(package private)  int iImgEnd
           
(package private)  int iImgStart
           
(package private)  int iIndice
           
(package private)  ImageKit ik
           
(package private)  int iLegendAlign
           
(package private)  int iLegendHeight
           
(package private)  int iMaxHeight
           
(package private)  int iMaxImages
           
(package private)  int iMaxImgHeight
           
(package private)  int iMaxImgWidth
           
(package private)  int iMaxWidth
           
(package private)  int ind
           
(package private)  int iPanelHeight
           
(package private)  int iPanelWidth
           
(package private)  int iSpinHeight
           
(package private)  int iSpinWidth
           
(package private)  javax.swing.JPanel jp
           
(package private)  javax.swing.JScrollPane jsp
           
(package private)  java.lang.String[] labels
           
(package private)  javax.swing.JTextField legend
           
(package private)  java.util.List list_msg
           
(package private)  int numBytesRead
           
(package private)  javax.swing.JProgressBar progressBar
           
(package private)  java.lang.String[][] result
           
(package private)  java.lang.StringBuffer sbImage
           
(package private)  java.lang.String sCurrent
           
(package private)  java.lang.String sLegendPosition
           
(package private)  javax.swing.SpinnerListModel slm
           
(package private)  java.lang.String sNewImageTitle
           
(package private)  javax.swing.JSpinner spin
           
(package private)  java.lang.String sScale
           
(package private)  java.lang.String sSpinName
           
(package private)  java.lang.String[] URLs
           
(package private)  java.util.List vImg
           
(package private)  java.util.List vImgInit
           
(package private)  java.util.List vImgProps
           
 
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
ImageSpinner(java.lang.String sName, DrawLAF laf, java.awt.Color cColor)
          default constructor
 
Method Summary
(package private)  void clean()
          clean the spinner
(package private)  void displayFullSizeImage()
          display image full size
(package private)  javax.swing.ImageIcon getBlankImageIcon()
           
(package private)  java.lang.String getCurrentImageName()
           
(package private)  javax.swing.ImageIcon getImage(java.lang.String sImage)
          get image from file
(package private)  java.lang.String getImageContent()
           
(package private)  int getImageIndice(java.lang.String sImageName)
          get image indice by name
(package private)  java.lang.String getNewImageList()
          get the new images list
(package private)  java.awt.event.MouseListener ImageMouseListener()
          mouse listener for new items
(package private)  void print(java.lang.String s)
           
(package private)  void printMemory()
           
(package private)  void readImageBase(java.lang.String sImage, java.lang.String sImgName, java.lang.String sLegend, java.lang.String sTooltip)
          read image from database the image is received as succeeding chunks
(package private)  void refresh(boolean bResize)
          spinner actualization
(package private)  void scaleImage(java.lang.String s)
          image scaling
(package private)  void setBorderType(java.lang.String sBorder, java.awt.Color c, int iWidth)
          set the spinner border type
(package private)  void setImage(java.lang.String name, javax.swing.ImageIcon ii, java.lang.String legend, java.lang.String tooltip)
          add image given
(package private)  void setImage(java.lang.String name, java.lang.String url, java.lang.String legend, java.lang.String tooltip)
          add image from URL
(package private)  void setImageMagnifier(boolean b)
          switch the image magnifier feature on/off
(package private)  void setImageToRead(java.lang.String sName)
          set the image to read bytes
(package private)  void setKeepImageSize(boolean b)
          keep/loose initial image size
(package private)  void setLabels(java.lang.String title, java.lang.String name, java.lang.String legend, java.lang.String tooltip)
          set the new image table labels
(package private)  void setLegend(boolean b)
          show/hide the legend
(package private)  void setLegendAlignment(java.lang.String s)
          set the legend alignment
(package private)  void setLegendBGColor(java.awt.Color c)
          set the legend background color
(package private)  void setLegendColors(java.awt.Color fg, java.awt.Color bg)
          set the legend colors
(package private)  void setLegendFGColor(java.awt.Color c)
          set the legend foreground color
(package private)  void setLegendFont(java.awt.Font f)
          set the legend font
(package private)  void setLegendPosition(java.lang.String s)
          set the legend horizontal position
(package private)  void setPanelBackground(java.awt.Color c)
          set the component background color
(package private)  void setPanelMaxSize(int width, int height)
          set the maximum panel size (for scale = LARGEST)
(package private)  void setPanelSize(int width, int height)
          set the panel size
 
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, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, 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, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

spin

javax.swing.JSpinner spin

legend

javax.swing.JTextField legend

iMaxImages

int iMaxImages

cPanel

java.awt.Color cPanel

cLegendFG

java.awt.Color cLegendFG

cLegendBG

java.awt.Color cLegendBG

cButtonColor

java.awt.Color cButtonColor

cCanvasColor

java.awt.Color cCanvasColor

sLegendPosition

java.lang.String sLegendPosition

sNewImageTitle

java.lang.String sNewImageTitle

labels

java.lang.String[] labels

URLs

java.lang.String[] URLs

result

java.lang.String[][] result

jsp

javax.swing.JScrollPane jsp

sScale

java.lang.String sScale

sCurrent

java.lang.String sCurrent

sSpinName

java.lang.String sSpinName

border

javax.swing.border.Border border

emptyborder

javax.swing.border.Border emptyborder

bTrsp

boolean bTrsp

bBorder

boolean bBorder

bLegend

boolean bLegend

bMustScale

boolean bMustScale

bImgMagnifier

boolean bImgMagnifier

bKeepImageSize

boolean bKeepImageSize

iLegendAlign

int iLegendAlign

iIndice

int iIndice

iMaxWidth

int iMaxWidth

iMaxHeight

int iMaxHeight

iMaxImgWidth

int iMaxImgWidth

iMaxImgHeight

int iMaxImgHeight

iPanelWidth

int iPanelWidth

iPanelHeight

int iPanelHeight

iSpinWidth

int iSpinWidth

iSpinHeight

int iSpinHeight

iCurrentImageIndice

int iCurrentImageIndice

iLegendHeight

int iLegendHeight

numBytesRead

int numBytesRead

iImgStart

int iImgStart

iImgEnd

int iImgEnd

ind

int ind

bImage

byte[] bImage

ik

ImageKit ik

vImg

java.util.List vImg

vImgInit

java.util.List vImgInit

vImgProps

java.util.List vImgProps

list_msg

java.util.List list_msg

dBean

DrawLAF dBean

jp

javax.swing.JPanel jp

slm

javax.swing.SpinnerListModel slm

sbImage

java.lang.StringBuffer sbImage

progressBar

javax.swing.JProgressBar progressBar

fis

java.io.InputStream fis

bi

java.awt.image.BufferedImage bi
Constructor Detail

ImageSpinner

public ImageSpinner(java.lang.String sName,
                    DrawLAF laf,
                    java.awt.Color cColor)
default constructor

Method Detail

setLegendFont

void setLegendFont(java.awt.Font f)
set the legend font


setLabels

void setLabels(java.lang.String title,
               java.lang.String name,
               java.lang.String legend,
               java.lang.String tooltip)
set the new image table labels


setLegendFGColor

void setLegendFGColor(java.awt.Color c)
set the legend foreground color


setKeepImageSize

void setKeepImageSize(boolean b)
keep/loose initial image size


setLegendColors

void setLegendColors(java.awt.Color fg,
                     java.awt.Color bg)
set the legend colors


setLegendBGColor

void setLegendBGColor(java.awt.Color c)
set the legend background color


setImageMagnifier

void setImageMagnifier(boolean b)
switch the image magnifier feature on/off


setLegend

void setLegend(boolean b)
show/hide the legend


setBorderType

void setBorderType(java.lang.String sBorder,
                   java.awt.Color c,
                   int iWidth)
set the spinner border type


setLegendPosition

void setLegendPosition(java.lang.String s)
set the legend horizontal position


setLegendAlignment

void setLegendAlignment(java.lang.String s)
set the legend alignment


setPanelBackground

void setPanelBackground(java.awt.Color c)
set the component background color


getCurrentImageName

java.lang.String getCurrentImageName()

setImage

void setImage(java.lang.String name,
              java.lang.String url,
              java.lang.String legend,
              java.lang.String tooltip)
add image from URL


getImageIndice

int getImageIndice(java.lang.String sImageName)
get image indice by name


getNewImageList

java.lang.String getNewImageList()
get the new images list


setImage

void setImage(java.lang.String name,
              javax.swing.ImageIcon ii,
              java.lang.String legend,
              java.lang.String tooltip)
add image given


refresh

void refresh(boolean bResize)
spinner actualization


clean

void clean()
clean the spinner


getBlankImageIcon

javax.swing.ImageIcon getBlankImageIcon()

setPanelSize

void setPanelSize(int width,
                  int height)
set the panel size


setPanelMaxSize

void setPanelMaxSize(int width,
                     int height)
set the maximum panel size (for scale = LARGEST)


scaleImage

void scaleImage(java.lang.String s)
image scaling


getImage

javax.swing.ImageIcon getImage(java.lang.String sImage)
get image from file


readImageBase

void readImageBase(java.lang.String sImage,
                   java.lang.String sImgName,
                   java.lang.String sLegend,
                   java.lang.String sTooltip)
read image from database the image is received as succeeding chunks


setImageToRead

void setImageToRead(java.lang.String sName)
set the image to read bytes


getImageContent

java.lang.String getImageContent()

ImageMouseListener

java.awt.event.MouseListener ImageMouseListener()
mouse listener for new items

Returns:
MouseListener

displayFullSizeImage

void displayFullSizeImage()
display image full size


print

void print(java.lang.String s)

printMemory

void printMemory()