Hi all,
I’m making some custom components using the Ignition SDK ComponentExample as a loose template and I’ve run into a bit of a brick wall. I made a nifty little jPanel element that builds nicely into an importable module and shows up where it should in a custom Component Palette tab, and does everything that I want it to so far, but the problem I’m having is getting it to display all the custom properties I want to add. Some do show up, though, and I can’t tell why others don’t.
In the following code the ‘text’ field shows up but 'isClicked does not. I have variables declared before calling initComponents:
public String text = "Look at That!";
private boolean isClicked = false;
public PushPinRight() {
initComponents();
}
…
[code] public String getText() {
return text;
}
public void setText(String text) {
// Firing property changes like this is required for any property that has the BOUND_MASK set on it.
// (See this component’s BeanInfo class)
String old = this.text;
this.text = text;
firePropertyChange(“text”, old, text);
repaint();
}
public boolean getisClicked() {
return isClicked;
}
public void setisClicked(boolean isClicked) {
// Firing property changes like this is required for any property that has the BOUND_MASK set on it.
// (See this component's BeanInfo class)
boolean old = this.isClicked;
this.isClicked = isClicked;
firePropertyChange("isClicked", old, isClicked);
repaint();
}[/code]
and in the BeanInfo file
super.initProperties();
addProp("text", "Text", "The text to display in the component", CAT_DATA, BOUND_MASK);
addProp("isClicked", "Is Clicked", "holds open popup information when True", CAT_DATA, BOUND_MASK);
Does anyone have an idea as to why one works and the other does not? Thanks in advance for any help.