jadex.swing.map
Class IntervalUI

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--jadex.swing.map.IntervalUI
All Implemented Interfaces:
java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.io.Serializable

public class IntervalUI
extends javax.swing.JComponent
implements java.awt.event.MouseListener

A customized JComponent to display a Interval.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
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
IntervalUI()
          Default constructor.
IntervalUI(jade.db.AceObject o)
          Constructor with interval (aceobject) as only argument.
IntervalUI(float start, float end, java.lang.String name)
          Constructor with start, end values and name of interval.
 
Method Summary
 float getEnd()
          Get the end value.
 java.lang.String getName()
          Get the name of this intervalUI.
 float getStart()
          Get the start value.
 boolean intersect(IntervalUI iu)
          Check if two intervals intersect.
 void mouseClicked(java.awt.event.MouseEvent e)
          For detailed information display.
 void mouseEntered(java.awt.event.MouseEvent e)
          For color change.
 void mouseExited(java.awt.event.MouseEvent e)
          Invoked when the mouse exits a component.
 void mousePressed(java.awt.event.MouseEvent e)
          For popupmenu showing up.
 void mouseReleased(java.awt.event.MouseEvent e)
          For popupmenu showing up.
 void paintComponent(java.awt.Graphics g)
          If the UI delegate is non-null, calls its paint method.
 void resetBackground()
          Reset the background to black.
 void setAceObject(jade.db.AceObject o)
          Set aceobject as the interval for this intervalUI.
 void setBackground(java.awt.Color b)
          Set the background color.
 void setEnd(float end)
          Set the end value.
 void setMapControl(MapControl c)
          Set the MapControl for this IntervalUI.
 void setName(java.lang.String name)
          Set the name of this intervalUI.
 void setStart(float start)
          Set the start value.
 
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, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, 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, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, 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, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, 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

IntervalUI

public IntervalUI()
Default constructor.

IntervalUI

public IntervalUI(float start,
                  float end,
                  java.lang.String name)
Constructor with start, end values and name of interval.
Parameters:
start - the start value of the MapRange for this IntervalUI.
end - the end value of the MapRange for this IntervalUI.
name - the name of this IntervalUI.

IntervalUI

public IntervalUI(jade.db.AceObject o)
Constructor with interval (aceobject) as only argument.
Parameters:
o - a Interval as a AceObejct to be displayed in this UI.
Method Detail

setAceObject

public void setAceObject(jade.db.AceObject o)
Set aceobject as the interval for this intervalUI.
Parameters:
o - the AceObject to be displayed in this IntervalUI.

setMapControl

public void setMapControl(MapControl c)
Set the MapControl for this IntervalUI.
Parameters:
c - the MapControl for coordinating all zooming activities in the whole MapView.

setStart

public void setStart(float start)
Set the start value.

getStart

public float getStart()
Get the start value.

setEnd

public void setEnd(float end)
Set the end value.

getEnd

public float getEnd()
Get the end value.

setName

public void setName(java.lang.String name)
Set the name of this intervalUI.
Overrides:
setName in class java.awt.Component
Following copied from class: java.awt.Component
Parameters:
name - The string that is to be this component's name.
See Also:
Component.getName()

getName

public java.lang.String getName()
Get the name of this intervalUI.
Overrides:
getName in class java.awt.Component
Following copied from class: java.awt.Component
Returns:
This component's name.
See Also:
Component.setName(java.lang.String)

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
For popupmenu showing up.
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
For detailed information display.
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
For popupmenu showing up.
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
For color change. When mouse in, show in red.
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Description copied from interface: java.awt.event.MouseListener
Invoked when the mouse exits a component.
Specified by:
mouseExited in interface java.awt.event.MouseListener

intersect

public boolean intersect(IntervalUI iu)
Check if two intervals intersect.
Parameters:
iu - another UI to be checked.
Returns:
true for intersecting.

paintComponent

public void paintComponent(java.awt.Graphics g)
Description copied from class: javax.swing.JComponent
If the UI delegate is non-null, calls its paint method. We pass the delegate a copy of the Graphics object to protect the rest of the paint code from irrevocable changes (for example, Graphics.translate()).
Overrides:
paintComponent in class javax.swing.JComponent
Following copied from class: javax.swing.JComponent
See Also:
JComponent.paint(java.awt.Graphics)

setBackground

public void setBackground(java.awt.Color b)
Set the background color.
Overrides:
setBackground in class javax.swing.JComponent
Parameters:
b - the new background.

resetBackground

public void resetBackground()
Reset the background to black.