Package nz.govt.natlib.meta.log

Examples of nz.govt.natlib.meta.log.LogLevel


    return insets;
  }

  public Component getTableCellRendererComponent(JTable table, Object value,
      boolean selected, boolean hasFocus, int row, int col) {
    LogLevel level = (LogLevel) value;

    label.setText(" ");
    this.setToolTipText(level.getName());

    if (level.getLevel() >= LogMessage.ERROR.getLevel()) {
      label.setIcon(max);
    } else if (level.getLevel() >= LogMessage.INFO.getLevel()) {
      label.setIcon(error);
    } else {
      label.setIcon(min);
    }
View Full Code Here


     * this way but other subclasses of Number might want to do this to save
     * space and avoid unnecessary heap allocation.
     */

    if (type == LogLevel.class) {
      LogLevel n1 = (LogLevel) data.getValueAt(row1, column);
      double d1 = n1.getLevel();
      LogLevel n2 = (LogLevel) data.getValueAt(row2, column);
      double d2 = n2.getLevel();

      if (d1 < d2) {
        return 1;
      } else if (d1 > d2) {
        return -1;
      } else {
        return 0;
      }
    } else if (type.getSuperclass() == java.lang.Number.class) {
      Number n1 = (Number) data.getValueAt(row1, column);
      double d1 = n1.doubleValue();
      Number n2 = (Number) data.getValueAt(row2, column);
      double d2 = n2.doubleValue();

      if (d1 < d2) {
        return -1;
      } else if (d1 > d2) {
        return 1;
View Full Code Here

TOP

Related Classes of nz.govt.natlib.meta.log.LogLevel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.