public void setValue(Object value) { //String str = getTextName(value, render_row, render_col); super.setValue(value); //label.setText(str); }
public void setValue(Object value) { super.setValue(value); }
@Override protected void setValue (Object value) { if ((value instanceof Integer) || (value instanceof Long)) { setText(_nfi.format(value) + " "); } else { super.setValue(value); } }
@Override protected void setValue(Object value) { String str = Long.toHexString(((MyLong) value).getValue()).toUpperCase(); while (str.length() < chars) str = "0" + str; super.setValue(str); } }
@Override public void setValue(Object aValue) { Object result = aValue; if ((aValue != null) && (aValue instanceof Number)) { Number numberValue = (Number) aValue; NumberFormat formatter = NumberFormat.getNumberInstance(); DecimalFormat df = (DecimalFormat) formatter; df.applyPattern("##0.00000"); result = df.format(numberValue.doubleValue()); } super.setValue(result); super.setHorizontalAlignment(SwingConstants.RIGHT); } }
/** * {@inheritDoc } */ @Override protected void setValue(Object value) { super.setValue(((Style) value).getName(getLocale())); }
/** * {@inheritDoc } * */ @Override protected void setValue(Object value) { super.setValue(((TypesafeEnum) value).getDisplayString(getLocale())); }
protected void setValue(Object value) { if (value instanceof Integer) { int depth = ((Integer) value).intValue(); if (depth == 0) { setText("a"); } else { String text = "a list of"; for (int index = 1; index < depth; index++) { text = text + " lists of"; } setText(text); } } else { super.setValue(value); } }
@Override protected void setValue(Object value) { super.setValue(cellRenderer.getDisplayValue(value, getLocale())); }
/** * Sets the <code>String</code> object for the cell being rendered to <code>value</code>. * * @param value the string value for this cell; if value is <code>null</code> it sets the text value to an empty string * @see JLabel#setText */ @Override protected void setValue(Object value) { super.setValue(((HorizontalAlignment) value).getDisplayString(getLocale())); }
/** Sets the <code>String</code> object for the cell being rendered to * <code>value</code>. * * @param value the string value for this cell; if value is * <code>null</code> it sets the text value to an empty string * @see JLabel#setText * * */ @Override protected void setValue(Object value) { super.setValue(((Style) value).getName(getLocale())); }
@Override protected void setValue(Object value) { super.setValue(cellRenderer.getDisplayValue(value, getLocale())); }
/** Sets the <code>String</code> object for the cell being rendered to * <code>value</code>. * * @param value the string value for this cell; if value is * <code>null</code> it sets the text value to an empty string * @see JLabel#setText * * */ @Override protected void setValue(Object value) { super.setValue(((TypesafeEnum) value).getDisplayString(getLocale())); }
/** Sets the <code>String</code> object for the cell being rendered to * <code>value</code>. * * @param value the string value for this cell; if value is * <code>null</code> it sets the text value to an empty string * @see JLabel#setText * * */ @Override protected void setValue(Object value) { super.setValue(((HorizontalAlignment) value).getDisplayString(getLocale())); }
protected void setValue(Object value) { if (value instanceof Integer) { int depth = ((Integer) value).intValue(); if (depth == 0) { setText("a"); } else if (depth == 1) { setText("a list of"); } else { setText(depth + "-deep list of"); } } else { super.setValue(value); } }
@Override public void setValue(Object aValue) { Object result = aValue; if ((aValue != null) && (aValue instanceof String)) { String stringValue = (String)aValue; if (!stringValue.equals("")) { int w = (int)getFont().getStringBounds(stringValue, frc).getWidth(); if (FILE_TABLE_WIDTH < w) { String s = stringValue; while (FILE_TABLE_WIDTH < w) { stringValue = stringValue.substring(5); w = (int)getFont().getStringBounds(stringValue, frc).getWidth(); } result = "..." + stringValue; } } } super.setValue(result); } }
@Override protected void setValue(final Object value) { super.setValue(value); final XfsService xfsService = (XfsService) value; final String text = Messages.getText(xfsService.getLogicalName()); setText(text); }
@Override protected void setValue(Object value) { if (value instanceof ImageIcon) { setIcon((Icon) value); setText(null); } else { super.setValue(value); setIcon(null); } if (value instanceof String) setHorizontalAlignment(LEFT); else setHorizontalAlignment(CENTER); } }
public void setValue(Object value) { setIcon(null); if (value instanceof File) { File file= (File) value; String fileName= chooser.getName(file); setText(fileName); Icon icon= FileChooserUI.getIcon(file, fileIcon, getFileChooser().getFileSystemView()); setIcon(icon); } else if (value instanceof Date) { setText((value == null) ? "" : df.format((Date) value)); } else { super.setValue(value); } } }
setBorder(noFocusBorder); setValue(value); return this;