Bar.java :  » Search » ivy-facade » com » procippus » ivy » graphics » Java Open Source

Java Open Source » Search » ivy facade 
ivy facade » com » procippus » ivy » graphics » Bar.java
package com.procippus.ivy.graphics;

import java.awt.Color;

public class Bar {
  double heightPct;
  Color color;
  String label;
  public double getHeightPct() {
    return heightPct;
  }
  public void setHeightPct(double heightPct) {
    this.heightPct = heightPct;
  }
  public Color getColor() {
    return color;
  }
  public void setColor(Color color) {
    this.color = color;
  }
  public String getLabel() {
    return label;
  }
  public void setLabel(String label) {
    this.label = label;
  }
  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((label == null) ? 0 : label.hashCode());
    return result;
  }
  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    Bar other = (Bar) obj;
    if (label == null) {
      if (other.label != null)
        return false;
    } else if (!label.equals(other.label))
      return false;
    return true;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.