Package net.sf.latexdraw.glib.ui.LMagneticGrid

Examples of net.sf.latexdraw.glib.ui.LMagneticGrid.GridStyle


    update();
  }


  protected void update() {
    final GridStyle style = grid.getStyle();
    final boolean visible = style!=GridStyle.NONE;

    composer.setWidgetVisible(gridSpacing, visible && style==GridStyle.CUSTOMISED);
    composer.setWidgetVisible(magneticCB, visible);
    styleList.setSelectedItemSafely(style.getLabel());

    if(visible) {
      if(style==GridStyle.CUSTOMISED)
        gridSpacing.setValueSafely(grid.getGridSpacing());
      magneticCB.setSelected(grid.isMagnetic());
View Full Code Here


    final ScaleRulersCustomiser scaleCust   = frame.getScaleRulersCustomiser();
    final FileLoaderSaver saver       = frame.getFileLoader();
    final LCanvas canvas          = frame.getCanvas();
    final Dimension dim           = LSystem.INSTANCE.getScreenDimension();
    final Rectangle rec           = frame.getGraphicsConfiguration().getBounds();
    final GridStyle gridStyle;

    if(displayGridCB.isSelected())
       gridStyle = classicGridRB.isSelected() ? GridStyle.STANDARD : GridStyle.CUSTOMISED;
    else gridStyle = GridStyle.NONE;

    gridCust.grid.setStyle(gridStyle);
    gridCust.grid.setMagnetic(magneticGridCB.isSelected());
    gridCust.grid.setGridSpacing(Integer.parseInt(persoGridGapField.getValue().toString()));
    canvas.setAlphaInterpolation(alpaInterCheckBox.isSelected() ? RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY : RenderingHints.VALUE_ALPHA_INTERPOLATION_SPEED);
    canvas.setAntiAliasing(antialiasingCheckBox.isSelected() ? RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF);
    canvas.setColorRendering(colorRenderCheckBox.isSelected() ? RenderingHints.VALUE_COLOR_RENDER_QUALITY : RenderingHints.VALUE_COLOR_RENDER_SPEED);
    canvas.setRendering(renderingCheckBox.isSelected() ? RenderingHints.VALUE_RENDER_QUALITY : RenderingHints.VALUE_RENDER_SPEED);
    exporter.setDefaultPackages(latexIncludes.getText());
    exporter.setPathExport(pathExportField.getText());
    gridCust.gridSpacing.setValueSafely(persoGridGapField.getValue());
    gridCust.magneticCB.setSelected(magneticGridCB.isSelected());
    gridCust.styleList.setSelectedItemSafely(gridStyle.getLabel());
    scaleCust.xRuler.setVisible(displayXScaleCB.isSelected());
    scaleCust.yRuler.setVisible(displayYScaleCB.isSelected());
    scaleCust.xRulerItem.setSelected(displayXScaleCB.isSelected());
    scaleCust.yRulerItem.setSelected(displayYScaleCB.isSelected());
    scaleCust.unitCmItem.setSelected(unitChoice.getSelectedItem().toString().equals(Unit.CM.getLabel()));
View Full Code Here

TOP

Related Classes of net.sf.latexdraw.glib.ui.LMagneticGrid.GridStyle

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.