Methods Summary |
---|
public void | addPropertyChangeListener(java.beans.PropertyChangeListener parm1)
if(pcs == null)
pcs = new PropertyChangeSupport(this);
pcs.addPropertyChangeListener(parm1);
|
void | apply_actionPerformed(java.awt.event.ActionEvent e)
if(bean != null){
changeStyleProperty(new Integer(choices.getSelectedItem()));
changeUseMonthStringProperty(new Boolean(useMS.isSelected()));
}
|
private void | changeStyleProperty(java.lang.Integer newValue)
Integer currentStyle = new Integer(bean.getStyle());
bean.setStyle(newValue.intValue());
if(pcs != null)
pcs.firePropertyChange("style", currentStyle, newValue);
|
private void | changeUseMonthStringProperty(java.lang.Boolean newValue)
Boolean currentStyle = new Boolean(bean.getUseMonthString());
bean.setUseMonthString(newValue.booleanValue());
if(pcs != null)
pcs.firePropertyChange("useMonthString", currentStyle, newValue);
|
public java.awt.Insets | getInsets() return new Insets(5,5,5,5);
|
private void | jbInit()
this.setLayout(borderLayout1);
southPanel.setLayout(fL1);
fL1.setAlignment(2);
gL1.setColumns(1);
gL1.setHgap(5);
apply.setText("Apply");
apply.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
apply_actionPerformed(e);
}
});
title.setText("Date Bean Customizer");
useMS.setText("Use Month String");
revert.setText("Revert");
revert.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
revert_actionPerformed(e);
}
});
centerPanel.setLayout(bL2);
buttonPanel.setLayout(gL1);
this.add(southPanel, BorderLayout.SOUTH);
southPanel.add(buttonPanel, null);
buttonPanel.add(apply, null);
buttonPanel.add(revert, null);
this.add(title, BorderLayout.NORTH);
this.add(centerPanel, BorderLayout.CENTER);
centerPanel.add(choices, BorderLayout.CENTER);
centerPanel.add(eastPanel, BorderLayout.EAST);
eastPanel.add(useMS, null);
|
public void | removePropertyChangeListener(java.beans.PropertyChangeListener parm1)
if(pcs != null)
pcs.removePropertyChangeListener(parm1);
|
void | revert_actionPerformed(java.awt.event.ActionEvent e)
changeStyleProperty(oldStyle);
choices.setSelectedItem(oldStyle.intValue());
changeUseMonthStringProperty(oldUseMonthString);
useMS.setSelected(oldUseMonthString.booleanValue());
|
public void | setObject(java.lang.Object in)
// jbInit() is fired from here instead of the constructor because it
// is assumed in the Beans Spec that setObject() is called first and is
// handled before any re-parenting of the Customizer by an IDE
try { jbInit(); } catch (Exception e) { e.printStackTrace(); }
if(in instanceof DateBean){
bean = (DateBean)in;
// capture old state values for use by revert
oldStyle = new Integer(bean.getStyle());
oldUseMonthString = new Boolean(bean.getUseMonthString());
// seed the customizer with copies the right settings for the current copy
choices.setSelectedItem(bean.getStyle());
useMS.setSelected(bean.getUseMonthString());
}
else
System.out.println("how'd that happen?");
|