StatusBarPanel.java :  » Development » jfritz-0.7.2 » de » moonflower » jfritz » Java Open Source

Java Open Source » Development » jfritz 0.7.2 
jfritz 0.7.2 » de » moonflower » jfritz » StatusBarPanel.java
package de.moonflower.jfritz;

import javax.swing.JToolBar;

public class StatusBarPanel extends JToolBar implements Comparable {
  
  private static final long serialVersionUID = -218612992436900904L;
  
  private int priority;
  
  public StatusBarPanel(int priority)
  {
    this.priority = priority;
  }
  
  public int getPriority()
  {
    return priority;
  }

  public int compareTo(Object o) {
    if (((StatusBarPanel) o).priority < this.priority)
      return 1;
    else if (((StatusBarPanel) o).priority > this.priority)
      return -1;
    else {
      return 0;
    }
      
  }
}
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.