Examples of Box


Examples of graphics.common.Box

        drawTreeRecursive( g, node.mTopLeft );
        drawTreeRecursive( g, node.mTopRight );
        drawTreeRecursive( g, node.mBottomLeft );
        drawTreeRecursive( g, node.mBottomRight );

        Box loc = node.mNodeLoc;
        //top
        g.drawLine( loc.getX(), loc.getY(),
                loc.getX() + loc.getWidth(), loc.getY() );
        //bottom
        g.drawLine( loc.getX(), loc.getY() + loc.getHeight(),
                loc.getX() + loc.getWidth(), loc.getY() + loc.getHeight() );
        //left
        g.drawLine( loc.getX(), loc.getY(), loc.getX(),
                loc.getY() + loc.getHeight() );
        //right
        g.drawLine( loc.getX() + loc.getWidth(), loc.getY(),
                loc.getX() + loc.getWidth(), loc.getY() + loc.getHeight() );
        loc = null;
    }
View Full Code Here

Examples of it.cilea.osd.jdyna.web.Box

 
 
  @Override
  public void validate(Object object, Errors errors) {

    Box metadato = (Box) object;

    // lo shortname non puo' essere vuoto

    String shortName = metadato.getShortName();
    if(shortName!=null && shortName.startsWith("edit")) {
      errors.rejectValue("shortName",
      "error.message.validation.shortname.pattern.nostartedit");
    }
    // validazione shortname...deve essere unico e non nullo e formato solo da caratteri
View Full Code Here

Examples of it.stefanobertini.zebra.cpcl.labelmode.Box

public class BoxTest {

    @Test
    public void test1() {

  Box command = new Box(new Position(1, 2), new Position(3, 4));

  CommandOutputBuilder output = new CommandOutputBuilder();
  output.printLn("BOX 1 2 3 4 1");

  assertCommand(output, command);
View Full Code Here

Examples of javafx.scene.shape.Box

        final PhongMaterial blueMaterial = new PhongMaterial();
        blueMaterial.setDiffuseColor(Color.DARKBLUE);
        blueMaterial.setSpecularColor(Color.BLUE);

        final Box xAxis = new Box(240.0, 1, 1);
        final Box yAxis = new Box(1, 240.0, 1);
        final Box zAxis = new Box(1, 1, 240.0);

        xAxis.setMaterial(redMaterial);
        yAxis.setMaterial(greenMaterial);
        zAxis.setMaterial(blueMaterial);

        axisGroup.getChildren().addAll(xAxis, yAxis, zAxis);
        world.getChildren().addAll(axisGroup);
    }
View Full Code Here

Examples of javax.swing.Box

          new PrefOption(AppPreferences.SHAPE_RECTANGULAR,
              Strings.getter("shapeRectangular")),
          new PrefOption(AppPreferences.SHAPE_DIN40700,
              Strings.getter("shapeDIN40700")) });
   
    Box localePanel = new Box(BoxLayout.X_AXIS);
    localePanel.add(Box.createGlue());
    localePanel.add(localeLabel);
    localeLabel.setMaximumSize(localeLabel.getPreferredSize());
    localeLabel.setAlignmentY(Component.TOP_ALIGNMENT);
    localePanel.add(locale);
    locale.setAlignmentY(Component.TOP_ALIGNMENT);
    localePanel.add(Box.createGlue());
   
    JPanel shapePanel = new JPanel();
    shapePanel.add(gateShape.getJLabel());
    shapePanel.add(gateShape.getJComboBox());
   
View Full Code Here

Examples of javax.swing.Box

      addGb(new JScrollPane(list));
      gbc.fill = GridBagConstraints.NONE;
     
      gbc.gridy++;
      addGb(new JLabel(Strings.get("labelImageFormat") + " "));
      Box formatsPanel = new Box(BoxLayout.Y_AXIS);
      formatsPanel.add(formatPng);
      formatsPanel.add(formatGif);
      formatsPanel.add(formatJpg);
      addGb(formatsPanel);
     
      gbc.gridy++;
      addGb(new JLabel(Strings.get("labelScale") + " "));
      addGb(slider);
View Full Code Here

Examples of javax.swing.Box

    hl.setLabelFor( htf );
    htf.addActionListener( clqh );
    box.add( Box.createHorizontalStrut( 20 ) );


    Box vbox = Box.createVerticalBox();
    cl = new JLabel( "Actual cache size", JLabel.CENTER );
    cl.setAlignmentX( Component.CENTER_ALIGNMENT );
    vbox.add( cl );

    js = new JSlider( JSlider.HORIZONTAL, 0, q * ( 1 << h ), cache );
    js.setMajorTickSpacing( 10 );
    js.setMinorTickSpacing( 1 );
    js.setPaintTicks( true );
    js.setPaintLabels( true );
    js.setBorder( BorderFactory.createEmptyBorder( 0, 0, 10, 0) );
    js.addChangeListener( new ChangeListener() {
        public void stateChanged( ChangeEvent e ) {
          JSlider source = (JSlider)e.getSource();
          //  if ( source.getValueIsAdjusting() ) return;
          try {
            int q, h, cache;
            q = Integer.parseInt( qtf.getText() );
            h = Integer.parseInt( htf.getText() );
            cache = source.getValue();
            dp.setValues( q, h, cache );
            dp.repaint();
          } catch ( Exception exc ) {
            JOptionPane.showMessageDialog( null, exc.getMessage(), "Alert", JOptionPane.ERROR_MESSAGE );
          }
        }
      });
    cl.setLabelFor( js );
    vbox.add( js );

    box.add( vbox );

    add( box );
    dp.setValues( q, h, cache );
View Full Code Here

Examples of javax.swing.Box

        JButton btNextYr = ComponentFactory.getIconButton(IconLibrary._icoArrowDown);
        btNextYr.setToolTipText(DcResources.getText("lblNextYear"));
        btNextYr.addActionListener(this);
        btNextYr.setActionCommand("nextYear");

        Box box = new Box(BoxLayout.X_AXIS);
        box.add(btPreviousMt);
        box.add(Box.createHorizontalStrut(3));
        box.add(btNextMt);
        add(box, BorderLayout.WEST);
       
        box = new Box(BoxLayout.X_AXIS);
        box.add(btPreviousYr);
        box.add(Box.createHorizontalStrut(3));
        box.add(btNextYr);       
        add(box, BorderLayout.EAST);
       
        setCurrentMonth(parent.getCalendar());
    }
View Full Code Here

Examples of javax.swing.Box

    public void setCurrentMonth(Calendar c) {
        setMonthComboBox(c);
        setYearComboBox(c);
       
        if(box == null) {
            box = new Box(BoxLayout.X_AXIS);
            box.add(monthBox);
            box.add(yearBox);
            add(box,BorderLayout.CENTER);
        }
    }
View Full Code Here

Examples of javax.swing.Box

     * @return String The key for this tool.
     */
    public Container getFace() {
        JPanel jtb = new JPanel();

        Box bigBox = Box.createHorizontalBox();
        Box rightBox = Box.createVerticalBox();
        Box leftBox = Box.createVerticalBox();
        Box innerBox = Box.createHorizontalBox();

        try {
            URL url = PropUtils.getResourceOrFileOrURL(this, snapshotIconName);
            ImageIcon snapshotIcon = new ImageIcon(url);

            url = PropUtils.getResourceOrFileOrURL(this, totalScenarioIconName);
            ImageIcon totalScenarioIcon = new ImageIcon(url);

            timeWrapToggle = new JToggleButton(totalScenarioIcon, timeWrap);
            timeWrapToggle.setSelectedIcon(snapshotIcon);
            timeWrapToggle.setActionCommand(SCENARIO_MODE_CMD);
            timeWrapToggle.addActionListener(this);
            timeWrapToggle.setToolTipText("Wrap Scenario Time Scale");
            // jtb.add(timeWrapToggle);
            innerBox.add(timeWrapToggle);

        } catch (MalformedURLException murle) {
            Debug.error("ScenarioGraphicLoader " + getName() + ":"
                    + murle.getMessage());
        } catch (NullPointerException npe) {
            Debug.error("ScenarioGraphicLoader " + getName() + ":"
                    + npe.getMessage());
        }

        timerControl = new TimerControlButtonPanel(this);
        // jtb.add(timerControl);
        innerBox.add(timerControl);
        rightBox.add(innerBox);

        pcs.addPropertyChangeListener(TIMER_RUNNING_STATUS, timerControl);

        String runningStatus = timer.isRunning() ? (getClockDirection() > 0 ? TIMER_FORWARD
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.