1 package net.suberic.util.gui.propedit; 2 import javax.swing.*; 3 import java.awt.Component ; 4 import java.awt.Dimension ; 5 import net.suberic.util.*; 6 7 11 public class SpacerEditorPane extends SwingPropertyEditor { 12 protected Component strut = null; 13 14 21 public void configureEditor(String propertyName, String template, String propertyBaseName, PropertyEditorManager newManager) { 22 configureBasic(propertyName, template, propertyBaseName, newManager); 23 int height = 10; 24 try { 25 height = Integer.parseInt(manager.getProperty(template + ".height", "10")); 26 } catch (Exception e) { 27 28 } 29 strut = Box.createVerticalStrut(height); 30 this.add(strut); 31 this.setMinimumSize(new Dimension (1, height)); 32 this.setPreferredSize(new Dimension (10, height)); 33 this.setMaximumSize(new Dimension (Integer.MAX_VALUE, height)); 34 35 } 36 37 43 public void setValue() { 44 45 } 46 public void validateProperty() { 47 48 } 49 50 56 public java.util.Properties getValue() { 57 java.util.Properties retProps = new java.util.Properties (); 58 59 return retProps; 60 } 61 62 66 public void resetDefaultValue() { 67 } 68 69 72 public void setSelectedValue(String newValue) { 73 } 74 75 79 public boolean isChanged() { 80 return false; 81 } 82 83 86 public PropertyEditorPane getPropertyEditorPane() { 87 return getPropertyEditorPane(this); 88 } 89 90 93 public String getDisplayValue() { 94 return getProperty(); 95 } 96 97 100 protected void updateEditorEnabled() { 101 102 } 103 104 } 105 | Popular Tags |