Package com.intellij.openapi.graph.option

Examples of com.intellij.openapi.graph.option.OptionHandler


  }

  public void actionPerformed(final AnActionEvent e, final Graph2D graph2D) {
    Graph2DPrinter gprinter = GraphManager.getGraphManager().createGraph2DPrinter(getGraph2DView(graph2D));

    final OptionHandler handler = PrintUtil.createPrintOptions();
    //show custom print dialog and adopt values
    if (!handler.showEditor()) return;

    PrintUtil.initGraph2DPrinter(gprinter, handler);
    //show default print dialogs
    PrinterJob printJob = PrinterJob.getPrinterJob();
    if (myPageFormat == null) myPageFormat = printJob.defaultPage();
View Full Code Here


    //gp.setTitleDrawable(dtd);
  }

  public static OptionHandler createPrintOptions() {
    //setup option handler
    final OptionHandler handler = GraphManager.getGraphManager().createOptionHandler(GraphBundle.message("graph.framework.printing.options"));

    handler.useSection(GENERAL_SECTION);
    handler.addInt(POSTER_ROWS, 1);
    handler.addInt(POSTER_COLUMNS, 1);
    handler.addBool(POSTER_COORDS, false);
    final String[] area = {VIEW, GRAPH};
    handler.addEnum(CLIP_AREA, area, 1);

    //Graph2DPrinter.DefaultTitleDrawable td = GraphManager.getGraphManager().createGraph2DPrinter_DefaultTitleDrawable();
    //handler.useSection(TITLE_SECTION);
    //handler.addString(TEXT, td.getText());
    //handler.addColor(TITLEBAR_COLOR, td.getTitleBarColor(), true);
View Full Code Here

  public static PrintPreviewPanel createPanel(PrinterJob printJob, final Graph2DPrinter gp, PageFormat pf) {
    final PrintPreviewPanel panel = GraphManager.getGraphManager()
      .createPrintPreviewPanel(printJob, gp, gp.getPosterColumns(), gp.getPosterColumns() * gp.getPosterRows(), pf);

    final OptionHandler options = PrintUtil.createPrintOptions();

    //show custom print dialog and adopt values
    Action optionAction = new AbstractAction(PrintUtil.OPTIONS_BUTTON) {
      public void actionPerformed(ActionEvent ev) {
        if (!options.showEditor()) return;

        PrintUtil.initGraph2DPrinter(gp, options);

        panel.setPages(0, gp.getPosterColumns(), gp.getPosterColumns() * gp.getPosterRows());
      }
View Full Code Here

TOP

Related Classes of com.intellij.openapi.graph.option.OptionHandler

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.