Adempiere 3.5.2a

org.adempiere.apps.graph
Class BarGraphColumn

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by org.adempiere.apps.graph.BarGraphColumn
All Implemented Interfaces:
MouseListener, ImageObserver, MenuContainer, Serializable, EventListener

public class BarGraphColumn
extends JComponent
implements MouseListener

Bar Graph Column

Version:
$Id: BarGraphColumn.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $
Author:
Jorg Janke
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
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
BarGraphColumn(MAchievement achievement)
          Single Achievement Constructor
BarGraphColumn(MGoal goal, BigDecimal data)
          Achievement Goal Constructor
BarGraphColumn(MMeasureCalc mc, BigDecimal data)
          Measure Calc Constructor
BarGraphColumn(MProjectType pt, BigDecimal data, int id)
          Project Type Constructor
BarGraphColumn(MRequestType rt, BigDecimal data, int id)
          Request Type Constructor
BarGraphColumn(String label, double value)
          Base Constructor
 
Method Summary
 void addActionListener(ActionListener l)
          Adds an ActionListener to the indicator.
protected  void fireActionPerformed(MouseEvent event)
          Notifies all listeners that have registered interest for notification on this event type.
 MAchievement getAchievement()
          Get Single Achievement
 ActionListener[] getActionListeners()
          Returns an array of all the ActionListeners added to this indicator with addActionListener().
 double getColHeight()
           
 double getColWidth()
           
 Timestamp getDate()
           
 MGoal getGoal()
          Get Achievement Goal
 int getID()
           
 String getLabel()
           
 Dimension getMaximumSize()
          Get Maximum Size
 MMeasureCalc getMeasureCalc()
          Get MeasureCalc
 String getMeasureDisplay()
           
 Dimension getMinimumSize()
          Get Minimum Size
 Dimension getPreferredSize()
          Get Preferred Size
 MProjectType getProjectType()
           
 MRequestType getRequestType()
           
 double getTargetValue()
           
 double getValue()
           
 void mouseClicked(MouseEvent e)
          Mouse Clicked
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
protected  void paintComponent(Graphics g)
          Paint Component
 void removeActionListener(ActionListener l)
          Removes an ActionListener from the indicator.
 void setBackground(Color bg)
          Set Background and matching Foreground
 void setColHeight(double height)
           
 void setColWidth(double width)
           
 void setLabel(String label)
           
 void setLabel(Timestamp date, String MeasureDisplay)
           
 void setTargetValue(double targetValue)
           
 void setValue(double value)
           
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, 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, 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, updateUI
 
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
 

Constructor Detail

BarGraphColumn

public BarGraphColumn(String label,
                      double value)
Base Constructor

Parameters:
label - label
value - value

BarGraphColumn

public BarGraphColumn(MAchievement achievement)
Single Achievement Constructor

Parameters:
achievement - achievement

BarGraphColumn

public BarGraphColumn(MGoal goal,
                      BigDecimal data)
Achievement Goal Constructor

Parameters:
goal - goal
data - count

BarGraphColumn

public BarGraphColumn(MMeasureCalc mc,
                      BigDecimal data)
Measure Calc Constructor

Parameters:
mc - MeasureCalc

BarGraphColumn

public BarGraphColumn(MRequestType rt,
                      BigDecimal data,
                      int id)
Request Type Constructor

Parameters:
rt - Request Type

BarGraphColumn

public BarGraphColumn(MProjectType pt,
                      BigDecimal data,
                      int id)
Project Type Constructor

Parameters:
pt - Procet Type
Method Detail

getGoal

public MGoal getGoal()
Get Achievement Goal

Returns:
achievement or null

getAchievement

public MAchievement getAchievement()
Get Single Achievement

Returns:
achievement or null

getMeasureCalc

public MMeasureCalc getMeasureCalc()
Get MeasureCalc

Returns:
measure

getRequestType

public MRequestType getRequestType()

getProjectType

public MProjectType getProjectType()

getMeasureDisplay

public String getMeasureDisplay()

getDate

public Timestamp getDate()

getID

public int getID()

setBackground

public void setBackground(Color bg)
Set Background and matching Foreground

Overrides:
setBackground in class JComponent
Parameters:
bg - background

getLabel

public String getLabel()
Returns:
Returns the label.

setLabel

public void setLabel(String label)
Parameters:
label - The label to set.

setLabel

public void setLabel(Timestamp date,
                     String MeasureDisplay)
Parameters:
date - for label.
MeasureDisplay - measure display

getTargetValue

public double getTargetValue()
Returns:
Returns the targetValue.

setTargetValue

public void setTargetValue(double targetValue)
Parameters:
targetValue - The targetValue to set.

getValue

public double getValue()
Returns:
Returns the data value.

setValue

public void setValue(double value)
Parameters:
value - The data value to set.

getColWidth

public double getColWidth()
Returns:
Returns the column width in pixles.

setColWidth

public void setColWidth(double width)
Parameters:
width - The column width in pixles.

getColHeight

public double getColHeight()
Returns:
Returns the height in pixles.

setColHeight

public void setColHeight(double height)
Parameters:
height - The hight in pixles.

getMaximumSize

public Dimension getMaximumSize()
Get Maximum Size

Overrides:
getMaximumSize in class JComponent
Returns:
size

getMinimumSize

public Dimension getMinimumSize()
Get Minimum Size

Overrides:
getMinimumSize in class JComponent
Returns:
size

getPreferredSize

public Dimension getPreferredSize()
Get Preferred Size

Overrides:
getPreferredSize in class JComponent
Returns:
size

paintComponent

protected void paintComponent(Graphics g)
Paint Component

Overrides:
paintComponent in class JComponent
Parameters:
g - graphics

addActionListener

public void addActionListener(ActionListener l)
Adds an ActionListener to the indicator.

Parameters:
l - the ActionListener to be added

removeActionListener

public void removeActionListener(ActionListener l)
Removes an ActionListener from the indicator.

Parameters:
l - the listener to be removed

getActionListeners

public ActionListener[] getActionListeners()
Returns an array of all the ActionListeners added to this indicator with addActionListener().

Returns:
all of the ActionListeners added or an empty array if no listeners have been added

fireActionPerformed

protected void fireActionPerformed(MouseEvent event)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the event parameter.

Parameters:
event - the ActionEvent object
See Also:
EventListenerList

mouseClicked

public void mouseClicked(MouseEvent e)
Mouse Clicked

Specified by:
mouseClicked in interface MouseListener
Parameters:
e - mouse event

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.