001package kiwi.ui.propeditor; 002 003import java.awt.event.*; 004import javax.swing.JComponent; 005 006/** 007 * 008 */ 009 010public abstract class PropertyValueEditor 011 { 012 protected Property property; 013 014 /** 015 */ 016 017 public abstract JComponent getEditorComponent(); 018 019 /** 020 */ 021 022 public void setProperty(Property property) 023 { 024 this.property = property; 025 026 prepareEditor(); 027 } 028 029 /** 030 */ 031 032 public Property getProperty() 033 { 034 return(property); 035 } 036 037 protected void prepareEditor() 038 { 039 } 040 041 /** 042 */ 043 044 public void startFocus() 045 { 046 } 047 048 /** 049 */ 050 051 public boolean validateInput() 052 { 053 return(true); 054 } 055 056 /** 057 */ 058 059 public void commitInput() 060 { 061 } 062 063 public abstract void addActionListener(ActionListener listener); 064 065 public abstract void removeActionListener(ActionListener listener); 066 067 } 068 069/* end of source file */