protected void refreshGUI() { Object value = property.get(); StringBuffer repr = new StringBuffer(); if (!omitPropertyName) { repr.append( edu.cmu.cs.stage3.alice.authoringtool.AuthoringToolResources.getReprForValue(property) + " = "); } if (value instanceof edu.cmu.cs.stage3.alice.core.Expression) { repr.append( edu.cmu.cs.stage3.alice.authoringtool.AuthoringToolResources.getNameInContext( (edu.cmu.cs.stage3.alice.core.Element) value, property.getOwner())); } else if (value == null) { repr.append("<None>"); } else if (value instanceof java.awt.Font) { java.awt.Font font = (java.awt.Font) value; repr.append(font.getFontName()); if (!(property.getOwner() instanceof edu.cmu.cs.stage3.alice.core.Text3D)) { repr.append(", " + font.getSize()); } } else { throw new RuntimeException("Bad value: " + value); } setText(repr.toString()); revalidate(); repaint(); }
@Override public void update() { setText( edu.cmu.cs.stage3.alice.authoringtool.AuthoringToolResources.getReprForValue( property.get(), property)); }
protected void updateNativeComponent() { String text = edu.cmu.cs.stage3.alice.authoringtool.AuthoringToolResources.getReprForValue( property.get(), property, property.getOwner().data); styleLabel.setText(text); }