1 18 19 package org.objectweb.jac.aspects.gui.swing; 20 21 import java.awt.GridLayout ; 22 import javax.swing.JLabel ; 23 import org.objectweb.jac.aspects.gui.FloatFormat; 24 import org.objectweb.jac.core.rtti.FieldItem; 25 26 29 30 public class FloatViewer extends FormatViewer 31 { 32 35 public FloatViewer(Object value, Object substance, FieldItem field) { 36 super(value,substance,field); 37 } 38 39 public FloatViewer() { 40 add(label); 41 } 42 43 protected void setLayout() { 44 setLayout(new GridLayout (1,1)); 45 label.setVerticalAlignment(JLabel.CENTER); 46 label.setHorizontalAlignment(JLabel.RIGHT); 47 } 48 49 protected void initFormat(FieldItem field) { 50 format = new FloatFormat(field); 51 } 52 } 53 | Popular Tags |