1 19 20 package org.netbeans.beaninfo.editors; 21 22 import java.awt.Point ; 23 import org.openide.util.NbBundle; 24 25 29 public class PointEditor extends ArrayOfIntSupport { 30 31 public PointEditor() { 32 super("java.awt.Point", 2); } 34 35 36 int[] getValues() { 37 Point p = (Point ) getValue(); 38 return new int[] { p.x, p.y }; 39 } 40 41 44 void setValues(int[] val) { 45 setValue(new Point (val[0], val[1])); 46 } 47 48 public boolean supportsCustomEditor () { 49 return true; 50 } 51 52 public java.awt.Component getCustomEditor () { 53 return new PointCustomEditor (this, env); 54 } 55 56 57 String getHintFormat() { 58 return NbBundle.getMessage (PointEditor.class, "CTL_HintFormatPE"); 59 } 60 61 62 protected String getXMLValueTag () { 63 return "Point"; } 65 66 } 67 | Popular Tags |