ago.beans
Class CombiPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--ago.beans.ColorPanel
                                |
                                +--ago.beans.CombiPanel
All Implemented Interfaces:
javax.accessibility.Accessible, javax.swing.event.ChangeListener, Colorable, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class CombiPanel
extends ColorPanel
implements Colorable

Realization of ColorPanel. Container for other ColorPanels:
CirclePanel, CustomPanel, HSBPanel & PixPanel.
CombiPanel can contain any combination of them. You can add your own ColorPanel here. But in IDE possible to edit only embedded panels.

Version:
1.0 / 17 may 2004
Author:
Arcadiy Gobuzov
See Also:
Serialized Form

Field Summary
static int BOTH
          iconMode's CONSTANT
static int CIRCLEPANEL
          CONSTANT for currentPanel
static int CUSTOMPANEL
          CONSTANT for currentPanel
static int HSBPANEL
          CONSTANT for currentPanel
static java.lang.String icon16
          filename of 16x16 color icon.
static int ICONS
          iconMode's CONSTANT
static int NAMES
          iconMode's CONSTANT
static int PIXPANEL
          CONSTANT for currentPanel
 
Fields inherited from class ago.beans.ColorPanel
arc, color, enabled, icon, intPanel, layout, name, previewPan
 
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
CombiPanel()
          default constructor.
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener c)
          register ChangeListener, which listen ChangeEvents.
 void addUserPanel(ago.beans.ColorPanel cp)
          use this method to add your own ColorPanels.
 java.lang.String getCircleSliderPlace()
           
 int getCircleSliderShape()
           
 int getCircleSliderThickness()
           
 int getCircleThumbHeight()
           
 int getCircleThumbMode()
           
 int getCircleThumbWidth()
           
 int getCurrentPanel()
           
 java.awt.Font getCustomRadioFont()
           
 java.lang.String getCustomRadioPlace()
           
 int getCustomSliderShape()
           
 java.awt.Font getCustomSpinnerFont()
           
 java.lang.String getCustomSpinPlace()
           
 int getCustomThumbHeight()
           
 int getCustomThumbWidth()
           
 int getHsbMode()
           
 java.awt.Font getHsbRadioFont()
           
 java.lang.String getHsbRadioPlace()
           
 java.lang.String getHsbSliderPlace()
           
 int getHsbSliderShape()
           
 int getHsbSliderThickness()
           
 int getHsbThumbHeight()
           
 int getHsbThumbMode()
           
 int getHsbThumbWidth()
           
 int getIconMode()
          return current iconMode (NAMES/ ICONS/ BOTH)
 java.lang.String getPixButtonPlace()
           
 java.lang.String getPixFilenamePlace()
           
 java.awt.Font getPixUserFont()
           
 int getTabPlacement()
           
 java.awt.Font getThisNamesFont()
           
 java.awt.Font getTotalFont()
           
 boolean isCircleCircle()
           
 boolean isCustomHorizontal()
           
 boolean isCustomRgbMode()
           
 boolean isHsbSquare()
           
 boolean isShowCircle()
           
 boolean isShowCustom()
           
 boolean isShowHSB()
           
 boolean isShowPix()
           
 void removeUserPanel(ago.beans.ColorPanel cp)
          use this method to remove your ColorPanels.
 void setCircleCircle(boolean flag)
           
 void setCircleSliderPlace(java.lang.String s)
           
 void setCircleSliderShape(int i)
           
 void setCircleSliderThickness(int i)
           
 void setCircleThumbHeight(int i)
           
 void setCircleThumbMode(int i)
           
 void setCircleThumbWidth(int i)
           
 void setColor(java.awt.Color c)
          color's setter
 void setCurrentPanel(int i)
           
 void setCustomHorizontal(boolean b)
           
 void setCustomRadioFont(java.awt.Font font)
          setup font on RadioButtons of CustomPanel
 void setCustomRadioPlace(java.lang.String s)
           
 void setCustomRgbMode(boolean b)
           
 void setCustomSliderShape(int i)
           
 void setCustomSpinnerFont(java.awt.Font font)
          setup font on Spinners of CustomPanel
 void setCustomSpinPlace(java.lang.String s)
           
 void setCustomThumbHeight(int i)
           
 void setCustomThumbWidth(int i)
           
 void setEnabled(boolean b)
          call this to enable / disable panel.
 void setHsbMode(int i)
           
 void setHsbRadioFont(java.awt.Font font)
          setup font on RadioButtons of HSBPanel
 void setHsbRadioPlace(java.lang.String s)
           
 void setHsbSliderPlace(java.lang.String s)
           
 void setHsbSliderShape(int i)
           
 void setHsbSliderThickness(int i)
           
 void setHsbSquare(boolean flag)
           
 void setHsbThumbHeight(int i)
           
 void setHsbThumbMode(int i)
           
 void setHsbThumbWidth(int i)
           
 void setIconMode(int i)
          setup iconMode for pages in JTabbedPane
 void setPixButtonPlace(java.lang.String s)
           
 void setPixFilenamePlace(java.lang.String s)
           
 void setPixUserFont(java.awt.Font font)
          setup font on components of PixPanel
 void setShowCircle(boolean b)
           
 void setShowCustom(boolean b)
           
 void setShowHSB(boolean b)
           
 void setShowPix(boolean b)
           
 void setTabPlacement(int i)
           
 void setThisNamesFont(java.awt.Font font)
          setup font on names of this JTabbedPane
 void setTotalFont(java.awt.Font font)
          setup font on ALL components of ALL panels,
except font, used for names on JTabbedPanel's pages
 void stateChanged(javax.swing.event.ChangeEvent e)
           
 
Methods inherited from class ago.beans.ColorPanel
callChangeListeners, getAbout, getColor, isContainPreview, isEnabled, removeChangeListener, setAbout, setContainPreview, setContainPreview, showDialog
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, 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, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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
 
Methods inherited from interface ago.beans.Colorable
getColor
 

Field Detail

icon16

public static final java.lang.String icon16
filename of 16x16 color icon.

See Also:
Constant Field Values

CUSTOMPANEL

public static final int CUSTOMPANEL
CONSTANT for currentPanel

See Also:
Constant Field Values

HSBPANEL

public static final int HSBPANEL
CONSTANT for currentPanel

See Also:
Constant Field Values

CIRCLEPANEL

public static final int CIRCLEPANEL
CONSTANT for currentPanel

See Also:
Constant Field Values

PIXPANEL

public static final int PIXPANEL
CONSTANT for currentPanel

See Also:
Constant Field Values

ICONS

public static final int ICONS
iconMode's CONSTANT

See Also:
Constant Field Values

NAMES

public static final int NAMES
iconMode's CONSTANT

See Also:
Constant Field Values

BOTH

public static final int BOTH
iconMode's CONSTANT

See Also:
Constant Field Values
Constructor Detail

CombiPanel

public CombiPanel()
default constructor. All my ColorsPanel added with default properties.

Method Detail

setEnabled

public void setEnabled(boolean b)
call this to enable / disable panel.
This method also enable/disable all panels inside.

Specified by:
setEnabled in class ColorPanel
Parameters:
b - - value of enabled flag

addUserPanel

public void addUserPanel(ago.beans.ColorPanel cp)
use this method to add your own ColorPanels.

Parameters:
cp - your panel

removeUserPanel

public void removeUserPanel(ago.beans.ColorPanel cp)
use this method to remove your ColorPanels.

Parameters:
cp - your panel to remove

getCustomRadioFont

public java.awt.Font getCustomRadioFont()
Returns:
font of RadioButtons of CustomPanel

setCustomRadioFont

public void setCustomRadioFont(java.awt.Font font)
setup font on RadioButtons of CustomPanel

Parameters:
font - font to install

getCustomSpinnerFont

public java.awt.Font getCustomSpinnerFont()
Returns:
font on Spinners of CustomPanel

setCustomSpinnerFont

public void setCustomSpinnerFont(java.awt.Font font)
setup font on Spinners of CustomPanel

Parameters:
font - font to install

getHsbRadioFont

public java.awt.Font getHsbRadioFont()
Returns:
font on RadioButtons of HSBPanel

setHsbRadioFont

public void setHsbRadioFont(java.awt.Font font)
setup font on RadioButtons of HSBPanel

Parameters:
font - font to install

getPixUserFont

public java.awt.Font getPixUserFont()
Returns:
font on components of PixPanel

setPixUserFont

public void setPixUserFont(java.awt.Font font)
setup font on components of PixPanel

Parameters:
font - font to install

getTotalFont

public java.awt.Font getTotalFont()
Returns:
font, used on ALL components of ALL panels
if this was setted

setTotalFont

public void setTotalFont(java.awt.Font font)
setup font on ALL components of ALL panels,
except font, used for names on JTabbedPanel's pages

Parameters:
font - font to install

getThisNamesFont

public java.awt.Font getThisNamesFont()
Returns:
font, used on names of this JTabbedPane

setThisNamesFont

public void setThisNamesFont(java.awt.Font font)
setup font on names of this JTabbedPane

Parameters:
font - font to install

getCustomSliderShape

public int getCustomSliderShape()
Returns:
shape of CustomPanel's sliders(see CONSTANTS of AgoSlider)

setCustomSliderShape

public void setCustomSliderShape(int i)
Parameters:
i - - shape of CustomPanel's sliders thumb (see CONSTANTS of AgoSlider, describe shapes)

getCircleSliderShape

public int getCircleSliderShape()
Returns:
shape of CirclePanel's slider(see CONSTANTS of AgoSlider)

setCircleSliderShape

public void setCircleSliderShape(int i)
Parameters:
i - - shape of CirclePanel's slider thumb (see CONSTANTS of AgoSlider, describe shapes)

getHsbSliderShape

public int getHsbSliderShape()
Returns:
shape of HsbPanel's slider(see CONSTANTS of AgoSlider)

setHsbSliderShape

public void setHsbSliderShape(int i)
Parameters:
i - - shape of HsbPanel's slider thumb (see CONSTANTS of AgoSlider, describe shapes)

getHsbThumbWidth

public int getHsbThumbWidth()
Returns:
width of HSBPanel's slider-thumb in pixels

setHsbThumbWidth

public void setHsbThumbWidth(int i)
Parameters:
i - width of HSBPanel's thumb

getHsbThumbHeight

public int getHsbThumbHeight()
Returns:
height of HSBPanel's slider-thumb in pixels

setHsbThumbHeight

public void setHsbThumbHeight(int i)
Parameters:
i - height of HSBPanel's thumb

getCircleThumbWidth

public int getCircleThumbWidth()
Returns:
width of CirclePanel's slider-thumb in pixels

setCircleThumbWidth

public void setCircleThumbWidth(int i)
Parameters:
i - width of CirclePanel's thumb

getCircleThumbHeight

public int getCircleThumbHeight()
Returns:
height of CirclePanel's slider-thumb in pixels

setCircleThumbHeight

public void setCircleThumbHeight(int i)
Parameters:
i - height of CirclePanel's thumb

getCustomThumbWidth

public int getCustomThumbWidth()
Returns:
width of CustomPanel's slider-thumb in pixels

setCustomThumbWidth

public void setCustomThumbWidth(int i)
Parameters:
i - width of CustomPanel's thumb

getCustomThumbHeight

public int getCustomThumbHeight()
Returns:
height of CustomPanel's slider-thumb in pixels

setCustomThumbHeight

public void setCustomThumbHeight(int i)
Parameters:
i - height of CustomPanel's thumb

getIconMode

public int getIconMode()
return current iconMode (NAMES/ ICONS/ BOTH)

Returns:
current iconMode (NAMES/ ICONS/ BOTH)

setIconMode

public void setIconMode(int i)
setup iconMode for pages in JTabbedPane

Parameters:
i - new iconMode (NAMES/ ICONS/ BOTH)

getHsbThumbMode

public int getHsbThumbMode()
Returns:
HSBPanel's slider thumbMode

setHsbThumbMode

public void setHsbThumbMode(int i)

getHsbSliderThickness

public int getHsbSliderThickness()

setHsbSliderThickness

public void setHsbSliderThickness(int i)

getPixButtonPlace

public java.lang.String getPixButtonPlace()

setPixButtonPlace

public void setPixButtonPlace(java.lang.String s)

setPixFilenamePlace

public void setPixFilenamePlace(java.lang.String s)

getPixFilenamePlace

public java.lang.String getPixFilenamePlace()

getCircleThumbMode

public int getCircleThumbMode()
Returns:
CirclePanel's slider thumbMode

setCircleThumbMode

public void setCircleThumbMode(int i)

setCircleSliderThickness

public void setCircleSliderThickness(int i)

getCircleSliderThickness

public int getCircleSliderThickness()

getTabPlacement

public int getTabPlacement()

setTabPlacement

public void setTabPlacement(int i)

setCircleCircle

public void setCircleCircle(boolean flag)

isCircleCircle

public boolean isCircleCircle()

setHsbSquare

public void setHsbSquare(boolean flag)

isHsbSquare

public boolean isHsbSquare()

setColor

public void setColor(java.awt.Color c)
Description copied from interface: Colorable
color's setter

Specified by:
setColor in interface Colorable
Specified by:
setColor in class ColorPanel
Parameters:
c - new color

isCustomRgbMode

public boolean isCustomRgbMode()

setCustomRgbMode

public void setCustomRgbMode(boolean b)

getCustomRadioPlace

public java.lang.String getCustomRadioPlace()

setCustomRadioPlace

public void setCustomRadioPlace(java.lang.String s)

getCustomSpinPlace

public java.lang.String getCustomSpinPlace()

setCustomSpinPlace

public void setCustomSpinPlace(java.lang.String s)

isCustomHorizontal

public boolean isCustomHorizontal()

setCustomHorizontal

public void setCustomHorizontal(boolean b)

setHsbMode

public void setHsbMode(int i)

getHsbMode

public int getHsbMode()

setCircleSliderPlace

public void setCircleSliderPlace(java.lang.String s)

getCircleSliderPlace

public java.lang.String getCircleSliderPlace()

setHsbSliderPlace

public void setHsbSliderPlace(java.lang.String s)

getHsbSliderPlace

public java.lang.String getHsbSliderPlace()

setHsbRadioPlace

public void setHsbRadioPlace(java.lang.String s)

getHsbRadioPlace

public java.lang.String getHsbRadioPlace()

setCurrentPanel

public void setCurrentPanel(int i)

getCurrentPanel

public int getCurrentPanel()

isShowCustom

public boolean isShowCustom()

setShowCustom

public void setShowCustom(boolean b)

isShowHSB

public boolean isShowHSB()

setShowHSB

public void setShowHSB(boolean b)

isShowCircle

public boolean isShowCircle()

setShowCircle

public void setShowCircle(boolean b)

isShowPix

public boolean isShowPix()

setShowPix

public void setShowPix(boolean b)

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Specified by:
stateChanged in interface javax.swing.event.ChangeListener

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener c)
Description copied from class: ColorPanel
register ChangeListener, which listen ChangeEvents. Events occurring, when user change color value on your ColorPanel

Overrides:
addChangeListener in class ColorPanel
Parameters:
c - ChangeListener for this one