Package org.malai.swing.widget

Examples of org.malai.swing.widget.MPanel


   * @param parentIns The instrument managing this dialogue box.
   */
  public InsertCodeDialog(final Instrument parentIns) {
    super(LangTool.INSTANCE.getString16("InsertPSTricksCodeFrame.0"), true); //$NON-NLS-1$
    setIconImage(LResources.INSERT_PST_ICON.getImage());
      final MPanel pButton = new MPanel(false, true);
      okButton = new MButton(LResources.LABEL_OK);
    cancelButton = new MButton(LResources.LABEL_CANCEL);
    parentIns.addEventable(pButton);
      editor = new JEditorPane();

      // The scroller of the editor
    final JScrollPane scrollPane = new JScrollPane(editor);
    scrollPane.setMinimumSize(new Dimension(450, 250));
    scrollPane.setPreferredSize(new Dimension(450, 250));
     scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

    final JLabel label = new JLabel(LangTool.INSTANCE.getString16("LaTeXDrawFrame.16"), SwingConstants.CENTER); //$NON-NLS-1$
    label.setAlignmentX(Component.CENTER_ALIGNMENT);

    editor.setText("");//$NON-NLS-1$
    pButton.add(okButton);
    pButton.add(cancelButton);
    pButton.setPreferredSize(new Dimension(280, 40));
    pButton.setMaximumSize(new Dimension(280, 40));
    getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
    getContentPane().add(label);
    getContentPane().add(scrollPane);
    getContentPane().add(pButton);

View Full Code Here


  }


  @Override
  public void compose(final MProgressBar progressBar) {
    final MPanel statusPanel = new MPanel(false, false);

    menubarBuilder.compose(progressBar);
    toolbarBuilder.compose(progressBar);
    propToolbarBuilder.compose(progressBar);

    /* Creation of the drawing area composed of the canvas, the scales, etc. */
    final MPanel drawingArea = new MPanel(false, false);
    drawingArea.setLayout(new BorderLayout());
    drawingArea.add(widget.xScaleRuler, BorderLayout.NORTH);
    drawingArea.add(widget.yScaleRuler, BorderLayout.WEST);
    drawingArea.add(widget.layeredPanel, BorderLayout.CENTER);
    drawingArea.add(propToolbarBuilder.getWidget(), BorderLayout.SOUTH);
    if(progressBar!=null) progressBar.addToProgressBar(5);

    /* Creation of the tabbed pane. */
    widget.tabbedPanel.addTab(LangTool.INSTANCE.getStringActions("UIBuilder.1"), drawingArea); //$NON-NLS-1$
    widget.tabbedPanel.addTab("PST", widget.getCodePanel()); //$NON-NLS-1$
View Full Code Here

  @Override
  public void compose(final MProgressBar progressBar) {
    final LCanvas canvas = frame.getCanvas();
    final MetaShapeCustomiser metaShapeCustomiser = frame.getMetaShapeCustomiser();

    widget = new MPanel(false, true);
    widget.setLayout(new FlowLayout(FlowLayout.LEFT));

    // Creation of the widgets layout of the shape properties instruments.
    composeJoinShapesWidgets(metaShapeCustomiser.getShapeGrouper());
    widget.add(composeRotationToolbar(metaShapeCustomiser.getRotationCustomiser(), canvas));
View Full Code Here

  protected WidgetMiniToolbar composeGridLabelsPropertiesToolbar(final ShapeAxesCustomiser axeCust, final ShapeGridCustomiser gridCust,
                                  final ShapeStandardGridCustomiser stdGridCust, final LCanvas canvas) {
    final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.GRID_LABELS, WidgetMiniToolbar.LOCATION_NORTH, canvas);
    list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.2")); //$NON-NLS-1$

    final MPanel p1 = new MPanel(false, true);
    final MPanel p2 = new MPanel(false, true);
    final MPanel p3 = new MPanel(false, false);
    p1.setLayout(new BoxLayout(p1, BoxLayout.X_AXIS));
    p2.setLayout(new BoxLayout(p2, BoxLayout.X_AXIS));
    p3.setLayout(new BoxLayout(p3, BoxLayout.Y_AXIS));
    UIBuilder.addSpinner(p1, stdGridCust.getLabelsSizeS(), 50);
    UIBuilder.addCombobox(p1, axeCust.getShowLabels());
    p1.add(gridCust.getColourLabels());
    p1.add(axeCust.getShowOrigin());
    p1.add(gridCust.getLabelsXInvertedCB());
    p1.add(gridCust.getLabelsYInvertedCB());
    UIBuilder.addSpinner(p2, axeCust.getIncrLabelX(), 50);
    UIBuilder.addSpinner(p2, axeCust.getIncrLabelY(), 50);
    UIBuilder.addSpinner(p2, axeCust.getDistLabelsX(), 60);
    UIBuilder.addSpinner(p2, axeCust.getDistLabelsY(), 60);
    p3.add(p1);
    p3.add(p2);
    list.addComponent(p3);
    list.addSeparator();

    mapContainers.put(axeCust.getShowLabels(), list);
    mapContainers.put(gridCust.getColourLabels(), list);
View Full Code Here

  /** Creates the toolbar containing the widgets that customises axes. */
  protected WidgetMiniToolbar composeAxesPropertiesToolbar(final ShapeAxesCustomiser cust, final LCanvas canvas) {
    final WidgetMiniToolbar list = new WidgetMiniToolbar(LResources.AXES_ICON, WidgetMiniToolbar.LOCATION_NORTH, canvas);
    list.setToolTipText(LangTool.INSTANCE.getStringActions("PropBuilder.3")); //$NON-NLS-1$
    final MPanel panel     = new MPanel(false, true);
    final MPanel ticksPanel = new MPanel(false, true);

    ticksPanel.setBorder(new CompoundBorder(new TitledBorder(null, LangTool.INSTANCE.getString18("ParametersAxeFrame.17"), //$NON-NLS-1$
          TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));

    panel.add(cust.getShapeAxes());

    UIBuilder.addCombobox(ticksPanel, cust.getShapeTicks());
View Full Code Here

TOP

Related Classes of org.malai.swing.widget.MPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.