|
|||||||||
| 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
javax.swing.JPanel
de.unibi.techfak.jpredictor.gui.ScorePlotBrowser
public class ScorePlotBrowser
Panel for browsing sequences and showing the motifs found.
| Nested Class Summary | |
|---|---|
(package private) class |
ScorePlotBrowser.ScorePlotArea
The hand-made JComponent, in which the score plot
is drawn. |
(package private) class |
ScorePlotBrowser.SequencePlotArea
The hand-made JComponent, in which the sequence
together with the motifs is drawn. |
| 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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
BARS
Draws something using bars. |
(package private) javax.swing.AbstractButton |
bMax
The radio button for the comprised maximum. |
(package private) javax.swing.AbstractButton |
bMean
The radio button for the comprised mean. |
(package private) javax.swing.AbstractButton |
bMin
The radio button for the comprised minimum. |
(package private) javax.swing.AbstractButton |
bNoBar
The button to disable the bar. |
(package private) javax.swing.AbstractButton |
bNoHLine
The button to disable the horizontal line. |
(package private) java.lang.String[] |
bTexts
The text for the buttons. |
(package private) static ICommunicator |
comm
The global communicator, used to 'talk' to the operator, what means, doing all settings and gettings through. |
static int |
DOTS
Draws something using dots. |
(package private) int |
drawingChoose
If the score plot is zoomed out many scores have to be comprised to one pixel (dot or line). |
(package private) int |
drawingStyle
The style in which the scores are plotted. |
(package private) javax.swing.JFileChooser |
fileChooser
The file chooser used in this window, its always used the same filechooser. |
(package private) int |
horizontalLine
Set by the spinner and by the methods receiving state change events of it. |
static int |
LINES
Draws something using lines. |
static int |
MAXIMUM
State for the maximum. |
static int |
MEAN
State for the mean. |
(package private) javax.swing.JMenuBar |
menuBar
Global setting whether a menu is present or not. |
static int |
MINIMUM
State for the minimum. |
(package private) static Operator |
op
The global operator, which performs all tasks on the sequences by using the motifs. |
(package private) javax.swing.JFrame |
parent
Parent window that holds the panel. |
(package private) double |
resultMax
The maximal number stored in the result vector. |
(package private) double |
resultMin
The minimal number stored in the result vector. |
(package private) int |
resultNumber
The number of results stored in the result vector. |
(package private) java.util.Vector |
results
Here the result vector from the communicator is stored. |
(package private) ScorePlotBrowser.ScorePlotArea |
scorePlotArea
The global area to draw the score plot. |
(package private) int |
selectionMid
Set by methods receiving mouse motion events of the ScorePlotArea. |
(package private) SequenceEnumeration |
sequenceEnum
Holds all sequences to be displayed. |
(package private) ScorePlotBrowser.SequencePlotArea |
sequencePlotArea
The global area to draw the sequence. |
(package private) javax.swing.SpinnerNumberModel |
spinnerNumberModel
The model used for the spinner which in turn is responsible for choosing the horizontal line's y-axis. |
(package private) StatusBar |
statusBar
The status bar with the different labels. |
(package private) double |
xZoom
Set when the buttons x zoom in and x zoom out are pressed. |
(package private) boolean |
xZoomFitToWindow
Set to true, if the user has not clicked on one of the
buttons for x-zoom . |
(package private) double |
yZoom
Set when the buttons y zoom in and y zoom out are pressed. |
(package private) boolean |
yZoomFitToWindow
Set to true, if the user has not clicked on one of the
buttons for y-zoom . |
| 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 | |
|---|---|
ScorePlotBrowser(javax.swing.JFrame parent,
boolean menu)
Constructor which builds the panel used in a stand alone application. |
|
ScorePlotBrowser(javax.swing.JFrame parent,
ICommunicator comm,
Operator op,
javax.swing.JFileChooser fc,
boolean menu)
Constructor which builds the panel. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
protected void |
createPanelSurface()
Creates this panel. |
javax.swing.JMenuBar |
getJMenuBar()
After constructing this class the menu bar can be obtained. |
protected javax.swing.JPanel |
getMotifPane(MouseOverHintManager hints)
Creates and returns the pane, where the sequence window together with the occuring motifs are shown. |
protected javax.swing.JPanel |
getPlotPane(MouseOverHintManager hints)
Creates and returns the pane, where the score over the sequence is plotted |
static void |
main(java.lang.String[] args)
The main method, called if the sequence browser is ran as stand alone prog |
void |
setXZoom(double newXZoom)
Sets the new zoom on the x axis. |
void |
setYZoom(double newYZoom)
Sets the new zoom on the y axis. |
void |
stateChanged(javax.swing.event.ChangeEvent e)
|
void |
updateCursorLocation(int x,
int y)
Gets the actual mouse cursor position and prints them to the coordLabel label. |
| 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, 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, 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 |
|---|
static ICommunicator comm
static Operator op
public static final int MINIMUM
public static final int MAXIMUM
public static final int MEAN
public static final int BARS
public static final int DOTS
public static final int LINES
javax.swing.JFrame parent
javax.swing.JMenuBar menuBar
menuBar is null. This means, that no menu
will be drawn and all buttons are present on the panels surface.
If the class is constructed by wishing a menu to be present, only
rudimentary buttons are shown on the panel and all other buttons
are banned to the menu.
javax.swing.JFileChooser fileChooser
ScorePlotBrowser.ScorePlotArea scorePlotArea
getPlotPane
ScorePlotBrowser.SequencePlotArea sequencePlotArea
getMotifPane
StatusBar statusBar
java.lang.String[] bTexts
javax.swing.AbstractButton bNoBar
javax.swing.AbstractButton bNoHLine
javax.swing.AbstractButton bMin
javax.swing.AbstractButton bMax
javax.swing.AbstractButton bMean
java.util.Vector results
null.
int resultNumber
ScorePlotArea
class.
double resultMin
ScorePlotArea class and used to
draw the y-axis.
double resultMax
ScorePlotArea class and used to
draw the y-axis.
javax.swing.SpinnerNumberModel spinnerNumberModel
ScorePlotArea-class, when the result vector
is updated.
SequenceEnumeration sequenceEnum
double xZoom
ScorePlotArea class.
It is initialy set to one by the constructor.
double yZoom
ScorePlotArea
class. It is initialy set to one by the constructor.
boolean xZoomFitToWindow
true, if the user has not clicked on one of the
buttons for x-zoom . As long as this switch is true, the
x-zoom is automatically set the way that the user can see the whole
area. This variable is used by the ScorePlotArea-class.
boolean yZoomFitToWindow
true, if the user has not clicked on one of the
buttons for y-zoom . As long as this switch is true, the
y-zoom is automatically set the way that the user can see the whole
area. This variable is used by the ScorePlotArea-class.
int selectionMid
ScorePlotArea. Gives the mid point of the grey
bar (displayed in the ScorePlotArea) and the mid
of the sequence shown in SequencePlotArea.
Set to -1 for no bar (dont't forget to repaint).
int horizontalLine
ScorePlotArea class.
Set to Integer.MIN_VALUE for no bar (dont't forget to
repaint).
int drawingStyle
BARS, if bars should be drawn, to DOTS,
if dots are wished and to LINES, if lines connecting
the dots should be drawn. Default is BARS.
int drawingChoose
MINIMUM,
MAXIMUM (default) or MEAN, repectively,
to tell the draw method what to do with the scores, when they are
broken down to one pixel width.
| Constructor Detail |
|---|
public ScorePlotBrowser(javax.swing.JFrame parent,
ICommunicator comm,
Operator op,
javax.swing.JFileChooser fc,
boolean menu)
fc==null, no file chooser will be uild up.
parent - The parent frame, in which this panel is shown.comm - The communicator interface.op - An operator for calling the specified tasks.fc - The filechooser from the parent, in which the correct
directory is set.menu - Decides whether the application is interactive by buttons
or by menu. If menu is true only rudimentary
buttons can be seen within the panel, all other buttons are gathered
in the menu.
public ScorePlotBrowser(javax.swing.JFrame parent,
boolean menu)
menu is true this application will have
a menu, that can be obtained by calling createMenuBar()
and its own the file chooser.
parent - The parent frame, in which this panel is shown.menu - Decides whether the application is interactive by buttons
or by menu. If menu is true only rudimentary
buttons can be seen within the panel, all other buttons are gathered
in the menu.getJMenuBar()| Method Detail |
|---|
protected void createPanelSurface()
public javax.swing.JMenuBar getJMenuBar()
protected javax.swing.JPanel getPlotPane(MouseOverHintManager hints)
hints - The hint manager some hints for the used components
are registered.
protected javax.swing.JPanel getMotifPane(MouseOverHintManager hints)
hints - The hint manager some hints for the used components
are registered.
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged in interface javax.swing.event.ChangeListenerpublic static void main(java.lang.String[] args)
args - Runtime arguments, parameterspublic void setXZoom(double newXZoom)
newXZoom - The new zoom to apply.public void setYZoom(double newYZoom)
newYZoom - The new zoom to apply.
public void updateCursorLocation(int x,
int y)
coordLabel label.
x - The mouse actual position within the window.y - The mouse actual position within the window.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||