MxDesignPanel
Class com.gp.api.swing.designer.MxDesignPanel can be used to edit instances of MxComponent. MxDesignPanel is a subclass of JSplitPane with the following additional methods:
For example the following code can be used to edit a pie chart:
import com.gp.api.styles.chart.MxPieChartStyle; |
MxDesignPanel panel = new MxDesignPanel(); | // create a new instance of MxDesignPanel |
MxComponent c = new MxComponent(); | // create a new chart component |
c.setSize(200,100); | // set component's size |
c.setStyle(new MxPieChartStyle()); | // set component's style |
c.setModel(new MxSampleChartModel(2,3)); | // set component's model |
panel.setTarget(c); | // set designer's target |
panel.setSize(600,400); | // set designer's size |
panel.setDividerLocation(400); | // set designer's location |
... |