Package net.sourceforge.squirrel_sql.plugins.graph.xmlbeans

Examples of net.sourceforge.squirrel_sql.plugins.graph.xmlbeans.FormatXmlBean


         return;
      }

      boolean isLandscape = _dlg.chkIsLandscape.isSelected();

      FormatXmlBean selBean = (FormatXmlBean) _dlg.lstFormats.getSelectedValue();

      if(null == selBean)
      {
         selBean = new FormatXmlBean(name, width, height, false,isLandscape);
         Vector<FormatXmlBean> v = new Vector<FormatXmlBean>();
         v.addAll(Arrays.asList(_formats));
         v.add(selBean);
         _formats = v.toArray(new FormatXmlBean[v.size()]);

         _dlg.lstFormats.setListData(_formats);
         _dlg.lstFormats.setSelectedValue(selBean, true);
      }
      else
      {
         selBean.setName(name);
         selBean.setWidth(width);
         selBean.setHeight(height);
         selBean.setLandscape(isLandscape);
         _dlg.lstFormats.repaint();
      }

      _listener.formatsChanged((FormatXmlBean)_dlg.lstFormats.getSelectedValue());
      saveFormats();
View Full Code Here


      }
   }

   private void updateRightSideControls()
   {
      FormatXmlBean selBean =(FormatXmlBean) _dlg.lstFormats.getSelectedValue();

      if(null == selBean)
      {
         _dlg.txtName.setText(null);
         _dlg.txtHeight.setText(null);
         _dlg.txtWidth.setText(null);
      }
      else
      {
         _dlg.txtName.setText(selBean.getName());
         _dlg.chkIsLandscape.setSelected(selBean.isLandscape());

         Unit unit = (Unit) _dlg.cboUnit.getSelectedItem();


         if(_dlg.cboUnit.getSelectedItem() == Unit.UNIT_CM)
         {
            _dlg.txtHeight.setText("" + selBean.getHeight());
            _dlg.txtWidth.setText("" + selBean.getWidth());
         }
         else
         {
            _dlg.txtHeight.setText("" +  selBean.getHeight() / unit.getInCm());
            _dlg.txtWidth.setText("" + selBean.getWidth() / unit.getInCm());
         }
      }
   }
View Full Code Here

   {
      return new
         FormatXmlBean[]
      {
      // i18n[graph.dina3=Din A 3]
      new FormatXmlBean(s_stringMgr.getString("graph.dina3"), 29.7, 42.0, false, false),
      // i18n[graph.dina4=Din A 4]
         new FormatXmlBean(s_stringMgr.getString("graph.dina4"), 21.0, 29.7, false, false),
      // i18n[graph.dina5=Din A 5]
         new FormatXmlBean(s_stringMgr.getString("graph.dina5"), 14.8, 21.0, true, false)
      };
   }
View Full Code Here

      _dlg.setVisible(b);
   }

   private void onLandscape()
   {
      FormatXmlBean selBean = (FormatXmlBean) _dlg.lstFormats.getSelectedValue();

      if(null == selBean)
      {
         return;
      }

      FormatXmlBean lsBean = new FormatXmlBean(selBean.getName() + " (LS)", selBean.getHeight(), selBean.getWidth(), false, true);

      Vector<FormatXmlBean> v = new Vector<FormatXmlBean>();
      v.addAll(Arrays.asList(_formats));
      v.add(lsBean);
      _formats = v.toArray(new FormatXmlBean[v.size()]);
View Full Code Here

         _formatController = new FormatController(_session, _plugin, fcl);
      }

      FormatXmlBean[] formats =_formatController.getFormats();

      FormatXmlBean toSelect = null;
      for (int i = 0; i < formats.length; i++)
      {
         _panel.cboFormat.addItem(formats[i]);
         if(formats[i].isSelected())
         {
View Full Code Here

         if (_panel.chkShowEdges.isSelected())
         {

            PageFormat pf = initPrint(true);

            FormatXmlBean format = (FormatXmlBean) _panel.cboFormat.getSelectedItem();

            PixelCalculater pc = new PixelCalculater(format);

            for (int pageIndex = 0; ; ++pageIndex)
            {
View Full Code Here

      return img;
   }

   private PageFormat initPrint(boolean isSaveToFile)
   {
      FormatXmlBean format = (FormatXmlBean)_panel.cboFormat.getSelectedItem();
      _printable.initPrint(format.getWidth(), format.getHeight(), _panel.sldEdges.getValue() / 100.0);

      PageFormat pf = isSaveToFile ? new SaveToFilePageFormat(format) : new PageFormat();

      if(format.isLandscape())
      {
         pf.setOrientation(PageFormat.LANDSCAPE);
      }
      else
      {
View Full Code Here

         _edgesGraphComponent = new EdgesGraphComponent();
      }

      if(showEdges)
      {
         FormatXmlBean format = (FormatXmlBean) _panel.cboFormat.getSelectedItem();
         _edgesGraphComponent.init(format, _panel.sldEdges.getValue() / 100.0, _panel.sldEdges.getValueIsAdjusting());
         _edgesListener.edgesGraphComponentChanged(_edgesGraphComponent, true);

      }
      else
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.plugins.graph.xmlbeans.FormatXmlBean

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.