/** * Returns the value at the specified row and column. This method supports * the TableModel interface. * * @param row the row index. * @param column the column index. * * @return the value. */ public Object getValueAt(final int row, final int column) { final SystemProperty sp = (SystemProperty) this.properties.get(row); if (column == 0) { return sp.getName(); } else { if (column == 1) { return sp.getValue(); } else { return null; } } }
/** * Returns the value at the specified row and column. This method supports * the TableModel interface. * * @param row the row index. * @param column the column index. * * @return the value. */ public Object getValueAt(final int row, final int column) { final SystemProperty sp = (SystemProperty) this.properties.get(row); if (column == 0) { return sp.getName(); } else { if (column == 1) { return sp.getValue(); } else { return null; } } }
/** * Compares two objects. * * @param o1 the first object. * @param o2 the second object. * * @return an integer that indicates the relative order of the objects. */ public int compare(final Object o1, final Object o2) { if ((o1 instanceof SystemProperty) && (o2 instanceof SystemProperty)) { final SystemProperty sp1 = (SystemProperty) o1; final SystemProperty sp2 = (SystemProperty) o2; if (this.ascending) { return sp1.getName().compareTo(sp2.getName()); } else { return sp2.getName().compareTo(sp1.getName()); } } else { return 0; } }
/** * Compares two objects. * * @param o1 the first object. * @param o2 the second object. * * @return an integer that indicates the relative order of the objects. */ public int compare(final Object o1, final Object o2) { if ((o1 instanceof SystemProperty) && (o2 instanceof SystemProperty)) { final SystemProperty sp1 = (SystemProperty) o1; final SystemProperty sp2 = (SystemProperty) o2; if (this.ascending) { return sp1.getName().compareTo(sp2.getName()); } else { return sp2.getName().compareTo(sp1.getName()); } } else { return 0; } }
/** * Compares two objects. * * @param o1 the first object. * @param o2 the second object. * * @return an integer that indicates the relative order of the objects. */ public int compare(final Object o1, final Object o2) { if ((o1 instanceof SystemProperty) && (o2 instanceof SystemProperty)) { final SystemProperty sp1 = (SystemProperty) o1; final SystemProperty sp2 = (SystemProperty) o2; if (this.ascending) { return sp1.getName().compareTo(sp2.getName()); } else { return sp2.getName().compareTo(sp1.getName()); } } else { return 0; } }
/** * Returns the value at the specified row and column. This method supports the TableModel * interface. * * @param row the row index. * @param column the column index. * * @return the value. */ public Object getValueAt(final int row, final int column) { final SystemProperty sp = (SystemProperty) this.properties.get(row); if (column == 0) { return sp.getName(); } else { if (column == 1) { return sp.getValue(); } else { return null; } } }