ChartSample.java
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:3k
源码类别:
OA系统
开发平台:
Java
- // Decompiled by DJ v2.9.9.60 Copyright 2000 Atanas Neshkov Date: 2002-12-03 18:42:38
- // Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
- // Decompiler options: packimports(3)
- // Source File Name: ChartSample.java
- package cn.com.fcsoft.chart;
- import java.awt.Color;
- import java.io.Serializable;
- public class ChartSample
- implements Serializable
- {
- public void set(double d, String s, Object obj)
- {
- value = new Double(d);
- label = s;
- key = obj;
- }
- public void setValue(double d)
- {
- value = new Double(d);
- }
- public long getValue()
- {
- if(value != null)
- return value.longValue();
- else
- return 0L;
- }
- public String toString()
- {
- if(label != null && value != null)
- return series + ":" + index + " " + label + " " + value.doubleValue();
- if(value != null)
- return series + ":" + index + " " + "null " + value.doubleValue();
- if(label != null)
- return series + ":" + index + " " + label;
- else
- return series + ":" + index + " " + "null 0";
- }
- public ChartSample(int i)
- {
- index = i;
- }
- public ChartSample(int i, double d)
- {
- index = i;
- value = new Double(d);
- }
- public ChartSample(int i, double d, String s, Object obj)
- {
- index = i;
- value = new Double(d);
- label = s;
- key = obj;
- }
- public boolean isSelected()
- {
- return selected;
- }
- public boolean hasValue()
- {
- return value != null && value.doubleValue() != (0.0D / 0.0D);
- }
- public double getFloatValue()
- {
- if(value != null)
- return value.doubleValue();
- else
- return (0.0D / 0.0D);
- }
- public void setLabelColor(Color color)
- {
- labelColor = color;
- }
- void setIndex(int i)
- {
- index = i;
- }
- public int getIndex()
- {
- return index;
- }
- public boolean setSelection(boolean flag)
- {
- selected = flag;
- return selected;
- }
- public Object getKey()
- {
- return key;
- }
- public boolean toggleSelection()
- {
- selected = !selected;
- return selected;
- }
- void setSeries(int i)
- {
- series = i;
- }
- public int getSeries()
- {
- return series;
- }
- public void clearValue()
- {
- value = null;
- }
- public void setLabel(String s)
- {
- label = s;
- }
- public String getLabel()
- {
- return label;
- }
- protected Double value;
- protected String label;
- Color labelColor;
- private static final Color DEFAULT_COLOR;
- private int series;
- private int index;
- Object key;
- private boolean selected;
- static
- {
- DEFAULT_COLOR = Color.black;
- }
- }