Package org.eclipse.swt.custom

Examples of org.eclipse.swt.custom.StyledText


  private Point computeMenuLocation(Control focus, Menu menu) {
    Point cursorLocation= focus.getDisplay().getCursorLocation();
    Rectangle clientArea= null;
    Point result= null;
    if (focus instanceof StyledText) {
      StyledText styledText= (StyledText)focus;
      clientArea= styledText.getClientArea();
      result= computeMenuLocation(styledText);
    } else if (focus instanceof Tree) {
      Tree tree= (Tree)focus;
      clientArea= tree.getClientArea();
      result= computeMenuLocation(tree);
View Full Code Here


    sectionLayout.marginHeight = 0;
    sectionLayout.marginWidth = 0;
    sectionContent.setLayout(sectionLayout);
    detailSection.setEnabled(false);

    detailListWidget = new StyledText(sectionContent, SWT.BORDER | SWT.V_SCROLL
        | SWT.WRAP);
    detailListWidget.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

    /*
     * Add a default message instead of an empty box if there is no history;
View Full Code Here

 
  public
  LinkArea(
    Composite  comp )
  {
    styled_text = new StyledText(comp,SWT.BORDER | SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL);   
    styled_text.setWordWrap(true);

    styled_text.addListener(SWT.MouseUp, new Listener() {
      public void handleEvent(Event event) {
        if (links.size() == 0) {
View Full Code Here

    gridData.widthHint = 70;
    bTestUDP.setLayoutData(gridData);
   
      // results
   
    textResults = new StyledText(panel, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.WRAP );
    gridData = new GridData();
    gridData.widthHint = 400;
    gridData.heightHint = 100;
    gridData.grabExcessVerticalSpace = true;
    gridData.verticalAlignment = SWT.FILL;
View Full Code Here

      window.setLayout(layout);
      FormData formData;
     
        // text area
     
      text_area = new StyledText(window,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
        
      text_area.setEditable(false);
     
      Button btnOk = new Button(window,SWT.PUSH);
      Button btnAbort = new Button(window,SWT.PUSH);
View Full Code Here

    window.setLayout(layout);
    FormData formData;
   
      // text blocked area
   
    final StyledText textBlocked = new StyledText(window,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
    Button btnClear = new Button(window,SWT.PUSH);
    textBlocked.setEditable(false);
   
    final StyledText textBanned = new StyledText(window,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
    Button btnOk = new Button(window,SWT.PUSH);
    Button btnReset = new Button(window,SWT.PUSH);
    textBanned.setEditable(false);
   
           
    formData = new FormData();
    formData.left = new FormAttachment(0,0);
    formData.right = new FormAttachment(100,0);
    formData.top = new FormAttachment(0,0);  
    formData.bottom = new FormAttachment(40,0);  
    textBlocked.setLayoutData(formData);
    textBlocked.setText(ipsBlocked);
   
   
    // label blocked area
   
    Label  blockedInfo = new Label(window, SWT.NULL);
    Messages.setLanguageText(blockedInfo,"ConfigView.section.ipfilter.blockedinfo");
    formData = new FormData();
    formData.top = new FormAttachment(textBlocked);   
    formData.right = new FormAttachment(btnClear);   
    formData.left = new FormAttachment(0,0);   
    blockedInfo.setLayoutData( formData );
      // clear button
   
   
    Messages.setLanguageText(btnClear,"Button.clear");
    formData = new FormData();
    formData.top = new FormAttachment(textBlocked);   
    formData.right = new FormAttachment(95,0 );   
    //formData.bottom = new FormAttachment(textBanned);
    formData.width = 70;
    btnClear.setLayoutData(formData);
    btnClear.addListener(SWT.Selection,new Listener() {

    public void handleEvent(Event e) {
    
      azureus_core.getIpFilterManager().getIPFilter().clearBlockedIPs();
     
      textBlocked.setText( "" );
    }
    });
   
   
      // text banned area
    formData = new FormData();
    formData.left = new FormAttachment(0,0);
    formData.right = new FormAttachment(100,0);
    formData.top = new FormAttachment(btnClear);  
    formData.bottom = new FormAttachment(btnOk);  
    textBanned.setLayoutData(formData);
    textBanned.setText(ipsBanned);
   
      // label banned area
   
    Label  bannedInfo = new Label(window, SWT.NULL);
    Messages.setLanguageText(bannedInfo,"ConfigView.section.ipfilter.bannedinfo");
    formData = new FormData();
    formData.right = new FormAttachment(btnReset);   
    formData.left = new FormAttachment(0,0);   
    formData.bottom = new FormAttachment(100,0)
    bannedInfo.setLayoutData( formData );
   
      // reset button
   
    Messages.setLanguageText(btnReset,"Button.reset");
    formData = new FormData();
    formData.right = new FormAttachment(btnOk);   
    formData.bottom = new FormAttachment(100,0);   
    formData.width = 70;
    btnReset.setLayoutData(formData);
    btnReset.addListener(SWT.Selection,new Listener() {

    public void handleEvent(Event e) {
      azureus_core.getIpFilterManager().getIPFilter().clearBannedIps();
      azureus_core.getIpFilterManager().getBadIps().clearBadIps();
   
      textBanned.setText( "" );   
      }
    });
      // ok button
   
    Messages.setLanguageText(btnOk,"Button.ok");
View Full Code Here

    layout.numColumns = 2;
    panel.setLayout(layout);

    GridData gd;

    consoleText = new StyledText(panel, SWT.READ_ONLY | SWT.V_SCROLL
        | SWT.H_SCROLL);
    gd = new GridData(GridData.FILL_BOTH);
    gd.horizontalSpan = 2;
    consoleText.setLayoutData(gd);
View Full Code Here

      WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), Display.getCurrent().getActiveShell(), "Unable to active TMLWarning-Hyperlink.", e);
    }
  }

  public void linkEntered() {
    StyledText textWidget = retrieveConsoleTextWidget();
    if (textWidget != null) {
      String message = _warning.getMessage();     
      try {
        textWidget.setToolTipText(WGUtils.toPlainText(message, "\n", false));
      } catch (IOException e) {
      }
    }
  }
View Full Code Here

      }
    }
  }

  public void linkExited() {
    StyledText textWidget = retrieveConsoleTextWidget();
    if (textWidget != null) {
      textWidget.setToolTipText("");
    }
  }
View Full Code Here

        public void handleEvent(Event event)
        {
          model.getLogArea().setText("");
        }});

      log = new StyledText(panel,SWT.READ_ONLY | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
      gridData = new GridData(GridData.FILL_BOTH);
      gridData.horizontalSpan = 2;
      log.setLayoutData(gridData);
      //String  text = model.getLogArea().getText().trim();
      //log.setText( text);
View Full Code Here

TOP

Related Classes of org.eclipse.swt.custom.StyledText

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.