public class ColorRange
extends com.physpics.tools.ui.blox.Blox
Modifier and Type | Class and Description |
---|---|
static class |
ColorRange.Editor |
com.physpics.tools.ui.blox.Blox.AccessibleBlox, com.physpics.tools.ui.blox.Blox.BaseAlignNote, com.physpics.tools.ui.blox.Blox.BkgdColorNote, com.physpics.tools.ui.blox.Blox.CrossSizeFull, com.physpics.tools.ui.blox.Blox.DebugNote, com.physpics.tools.ui.blox.Blox.Filler, com.physpics.tools.ui.blox.Blox.GlueNote, com.physpics.tools.ui.blox.Blox.NameNote, com.physpics.tools.ui.blox.Blox.Note, com.physpics.tools.ui.blox.Blox.Scroller, com.physpics.tools.ui.blox.Blox.StrutNote
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
BUILT_IN_RANGES |
DEFAULT_HEIGHT, DEFAULT_WIDTH, DIM_ZERO, PIXELS_PER_POINT
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Modifier and Type | Method and Description |
---|---|
static ColorRange |
create() |
java.lang.String |
getDestination() |
java.io.File |
getDir() |
java.lang.String |
getSource() |
void |
handleSaveButton()
Store the color data in current 'dest'.
|
static void |
main(java.lang.String[] args)
Run app from command line.
|
javax.swing.JFrame |
openWindow(javax.swing.JFrame f,
int width,
int height)
Override openWindow to also read the data.
|
static javax.swing.JFrame[] |
openWindows() |
boolean |
readColors(com.physpics.tools.IOUtils.InfoInputStream iis)
Read the splotch HSB from a text file
|
boolean |
readColors(java.io.Reader rdr)
Read the splotch HSB from a Reader
|
boolean |
readColors(java.lang.String s)
Read a colors range file from a string.
|
boolean |
saveColors(java.lang.String stem)
Save the current colors to original file.
|
void |
setDefaults()
Set default directories and initial color range.
|
void |
setDestination(java.lang.String destination) |
void |
setDir(java.lang.String dir) |
void |
setSource(java.lang.String source)
Set the source location name.
|
addImpl, addMany, baseAlign, color, componentOrientationFactory, createGlue, createHorizontalBlox, createHorizontalBlox, createHorizontalGlue, createHorizontalStrut, createRigidArea, createVerticalBlox, createVerticalBlox, createVerticalGlue, createVerticalStrut, crossSizeFull, debug, getAccessibleContext, getBaseline, getFrame, glue, name, openWindow, openWindow, paintComponent, pixelsToPoints, pointsToPixels, setLayout, setOpaque, setTransparent, strut, wrapFrame
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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
add, add, add, add, add, addContainerListener, 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, transferFocusDownCycle, validate, validateTree
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, 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, transferFocusBackward, transferFocusUpCycle
public java.io.File getDir()
public void setDir(java.lang.String dir)
dir
- working-directory value, expressed as a locatorpublic java.lang.String getSource()
public void setSource(java.lang.String source)
source
- the source to set. Strip leading '#'.
If the remaining string begins with '(', end string at ')'public java.lang.String getDestination()
public void setDestination(java.lang.String destination)
destination
- the destination to set.
The value should be a file name and not a locator.
To use a locator, write setDestination(computeSaveLocation(locator))
public static ColorRange create()
public void setDefaults()
public void handleSaveButton()
public boolean readColors(java.lang.String s)
s
- The full contents of a colorrange file.public boolean readColors(com.physpics.tools.IOUtils.InfoInputStream iis)
iis
- An IOUtils InfoInputStream indicating where to find the data.public boolean readColors(java.io.Reader rdr)
rdr
- A Reader of a stream of data lines.public boolean saveColors(java.lang.String stem)
stem
- Where to write the output, but without extension.
Files will be saved to stem+".txt", stem+".png, and stem+".htm"public javax.swing.JFrame openWindow(javax.swing.JFrame f, int width, int height)
openWindow
in class com.physpics.tools.ui.blox.Blox
public static javax.swing.JFrame[] openWindows()
public static void main(java.lang.String[] args)
args
- the command line arguments. Synopsis: [-D working-dir] [color-range-file]