Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Label.pack()


    Label statusMsg = new Label(dialog, SWT.NONE);
    StringBuffer sb = new StringBuffer("Forrest server is starting.\n");
    sb.append("\n\nPlease wait...");
    statusMsg.setText(sb.toString());
    statusMsg.setLocation(30, 25);
    statusMsg.pack();
    dialog.open();

    if (System.getProperty("os.name").toLowerCase().startsWith("linux")) {
      cmdString = "forrest -Dbasedir=" + workingDirectory
          + " webapp-local";
View Full Code Here


      clientDevice.addClientDeviceListener( new ClientDeviceAdapter() {
 
        @Override
        public void orientationChange( Orientation newOrientation ) {
          label.setText( newOrientation.toString() );
          label.pack();
        }
      } );
      String scaleFactor = Float.toString( clientDevice.getScaleFactor() );
      createLabel( group, "Scale Factor" ).setText( scaleFactor );
    }
View Full Code Here

      clientDevice.addClientDeviceListener( new ClientDeviceAdapter() {
 
        @Override
        public void connectionTypeChanged( ConnectionType newConnectionType ) {
          label.setText( newConnectionType.toString() );
          label.pack();
        }
      } );
    }
  }
View Full Code Here

  public Shell open(Display display) {
    final Shell shell = new Shell(display);
    final Label label = new Label(shell, SWT.CENTER);
    label.setText(HelloWorld3.resHello.getString("Hello_world"));
    label.pack();
    shell.addControlListener(new ControlAdapter() {
      public void controlResized(ControlEvent e) {
        label.setBounds(shell.getClientArea());
      }
    });
View Full Code Here

        GridData.GRAB_HORIZONTAL |
        GridData.HORIZONTAL_ALIGN_FILL);
    summaryLabelData.horizontalSpan = 2;
    summaryLabel.setLayoutData(summaryLabelData);
    summaryLabel.setText(message);
    summaryLabel.pack();
   
    final GridData gridData = new GridData(GridData.FILL_BOTH);
   
   
    Composite editArea = new Composite(container,SWT.NONE);
View Full Code Here

    Font font = new Font(container.getDisplay(),fontData);
    summaryLabel.setFont(font);
    GridData summaryLabelData = new GridData();
    summaryLabelData.horizontalSpan = 2;
    summaryLabel.setLayoutData(summaryLabelData);
    summaryLabel.pack();
   

    final GridData tableData = new GridData(GridData.FILL_VERTICAL | GridData.GRAB_VERTICAL);
    tableData.widthHint = 200;
 
View Full Code Here

    lblNichtAnzeigenHint.setBackground(shell.getBackground());
    lblNichtAnzeigenHint.setForeground(shell.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
    FontData fd = lblNichtAnzeigenHint.getFont().getFontData()[0];
    fd.setHeight(fd.getHeight()-1);
    lblNichtAnzeigenHint.setFont(new Font(shell.getDisplay(), fd));
    lblNichtAnzeigenHint.pack();
    contentsSize.y += marginBottom + lblNichtAnzeigenHint.getSize().y;
    contentsSize.x = Math.max(contentsSize.x, lblNichtAnzeigenHint.getSize().x);


    Rectangle screen = shell.getDisplay().getClientArea();
View Full Code Here

                                   name.setText(Utilities.verifyName(download.getName()));
                                   name.setBackground(Utilities.getDisplay().getSystemColor(SWT.COLOR_WHITE));
                                   GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
                                   gridData.horizontalSpan = 2;
                                   name.setLayoutData(gridData);
                                   name.pack();
                                  
                                   /*Label percent = new Label(DownloadManagerShell.DOWNLOADS, SWT.NULL);
                                   percent.setText(download.getStats().getCompleted() / 10 + "%");
                                   percent.setBackground(Utilities.getDisplay().getSystemColor(SWT.COLOR_WHITE));
                                   gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
View Full Code Here

                                           }
                                          
                                        
                                     });
                                  
                                   pause.pack();
                                  
                                  
                                 /* 
                                   int size = (DownloadManagerShell.DOWNLOADS.getSize().x -
                                           (DownloadManagerShell.DOWNLOADS.getBorderWidth()
View Full Code Here

                                   gridData = new GridData(GridData.FILL_HORIZONTAL);
                                   gridData.horizontalSpan = 2;
                                   customPB_label.setBackground(Utilities.getDisplay().getSystemColor(SWT.COLOR_WHITE));
                                   customPB_label.setLayoutData(gridData);
                                   customPB_label.setSize(customPB_label.getParent().getSize().x-70,20);
                                   customPB_label.pack();                                  
                                   DownloadManagerShell.DOWNLOADS.pack();
                                   DownloadManagerShell.DOWNLOADS.layout();                                  
                                   DownloadManagerShell.DOWNLOADS.getParent().layout();
                                   customPB_label.setSize(customPB_label.getParent().getSize().x-70,20);
                                   //System.out.println(download.getName() + " : " + customPB_label.getSize().x);
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.