i was the guy who asked for the html feature and to fix some problems with the palette.
But at least my wbp and factorys are working without problems.
In the Eclipse Error log i have the following:
!ENTRY org.eclipse.equinox.p2.directorywatcher 4 0 2009-12-17 10:15:39.017
!MESSAGE The installable unit com.instantiations.designer.jdt.fragment.translated_host_properties is missing the filename property.
the factory class and the wbp didn't change.
If i take a SwingDesigner 7.2.0r35x200911240638 everything works fine.
here an example:
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<factory>
<method name="createDefaultPanel" factory="true">
<name>Panel</name>
<description>Panel ohne sichtbare Border aber mit Defaultabständen zum Rand
</description>
</method>
<method name="createDefaultEtchedBorderPanel" factory="true">
<name>EtchedBorderPanel</name>
<description>Panel mit Etchedborder und Defaultabständen zum Rand
</description>
</method>
<method name="createDefaultEtchedBorderPanelTop" factory="true">
<name>EtchedBorderPanelTop</name>
<description>Panel mit Etchedborder und Abständen (Insets), die denen einer Titledborder mit Titleposition TOP entsprechen
</description>
</method>
<method name="createDefaultEtchedBorderPanel" factory="true">
<name>EtchedBorderPanel(borderInsets)</name>
<description>Panel mit Etchedborder und Abständen (Insets), die denen einer Titledborder mit Titleposition TOP entsprechen
</description>
<parameter type="java.awt.Insets"/>
</method>
<method name="createDefaultTitledBorder" factory="true">
<name>TitledBorderPanel(title)</name>
<description>Panel mit Titledborder und Defaultabständen der Inhalte zum Rand
</description>
<parameter type="java.lang.String"/>
</method>
<method name="createDefaultToolbar" factory="true">
<name>Toolbar</name>
<description>Toolbar nicht floatable.
Die Größe passt sich an den Inhalt an bzw. wird über constraints beim Hinzufügen zum Container konfiguriert.
</description>
</method>
</factory>
- Code: Select all
public class ContainerFactory {
public static JPanel createDefaultPanel() {
JPanel pnl = new JPanel();
pnl.setBorder(new EmptyBorder(2, 2, 2, 2));
return pnl;
}
public static JPanel createDefaultEtchedBorderPanel() {
return createDefaultEtchedBorderPanel(new Insets(0, 0, 0, 0));
}
public static JPanel createSeparator() {
JPanel result = new JPanel();
result.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
result.setPreferredSize(new Dimension(5, 5));
return result;
}
public static JPanel createDefaultEtchedBorderPanelTop() {
return createDefaultEtchedBorderPanel(new Insets(7, 2, 2, 2));
}
public static JPanel createDefaultEtchedBorderPanel(Insets borderInsets) {
JPanel pnl = new JPanel();
Insets newBorderInsets = borderInsets == null ? new Insets(0, 0, 0, 0) : borderInsets;
pnl.setBorder(new CompoundBorder(new EmptyBorder(newBorderInsets), new CompoundBorder(
new EtchedBorder(EtchedBorder.LOWERED, null, null), new EmptyBorder(2, 2, 2, 2))));
return pnl;
}
public static JPanel createDefaultTitledBorder(String title) {
JPanel pnl = new JPanel();
pnl.setBorder(new CompoundBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED,
null, null), title, TitledBorder.LEADING, TitledBorder.TOP, null, null),
new EmptyBorder(0, 0, 0, 0)));
return pnl;
}
public static JToolBar createDefaultToolbar() {
JToolBar result = new JToolBar();
result.setFloatable(false);
result.setMinimumSize(new Dimension(10, 10));
return result;
}
}
regards,
michael