Examples of StyledText


Examples of org.eclipse.swt.custom.StyledText

      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

Examples of org.eclipse.swt.custom.StyledText

      }
    }
  }

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

Examples of org.eclipse.swt.custom.StyledText

        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

Examples of org.eclipse.swt.custom.StyledText

        }
      });
   
      // log area

    log = new StyledText(child2,SWT.READ_ONLY | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
    grid_data = new GridData(GridData.FILL_BOTH);
    grid_data.horizontalSpan = 1;
    grid_data.horizontalIndent = 4;
    log.setLayoutData(grid_data);
    log.setIndent( 4 );
View Full Code Here

Examples of org.eclipse.swt.custom.StyledText

    shell.setLayout(layout);
    GridData grid_data = new GridData(GridData.FILL_BOTH );
    shell.setLayoutData(grid_data);

   
    log = new StyledText(shell,SWT.READ_ONLY | SWT.V_SCROLL | SWT.BORDER | SWT.WRAP | SWT.NO_FOCUS );
    grid_data = new GridData(GridData.FILL_BOTH);
    grid_data.horizontalSpan = 1;
    grid_data.horizontalIndent = 4;
    grid_data.widthHint = 300;
    grid_data.heightHint = 400;
View Full Code Here

Examples of org.eclipse.swt.custom.StyledText

        addOption( opt5, NetStatusPluginTester.TEST_BT_CONNECT );
       
      // log area
   
    log = new StyledText(main,SWT.READ_ONLY | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
    grid_data = new GridData(GridData.FILL_BOTH);
    grid_data.horizontalSpan = 1;
    grid_data.horizontalIndent = 4;
    log.setLayoutData(grid_data);
    log.setIndent( 4 );
View Full Code Here

Examples of org.eclipse.swt.custom.StyledText

        } catch (IOException e) {
        }
      }
    } else {

      StyledText helpPanel = new StyledText(cWhatsNew, SWT.VERTICAL | SWT.HORIZONTAL);

      helpPanel.setEditable(false);
      try {
        helpPanel.setRedraw(false);
        helpPanel.setWordWrap(false);
        helpPanel.setFont(monospace);

        black = ColorCache.getColor(display, 0, 0, 0);
        white = ColorCache.getColor(display, 255, 255, 255);
        light = ColorCache.getColor(display, 200, 200, 200);
        grey = ColorCache.getColor(display, 50, 50, 50);
        green = ColorCache.getColor(display, 30, 80, 30);
        blue = ColorCache.getColor(display, 20, 20, 80);
        int style;
        boolean setStyle;

        helpPanel.setForeground(grey);

        String[] lines = sWhatsNew.split("\\r?\\n");
        for (int i = 0; i < lines.length; i++) {
          String line = lines[i];

          setStyle = false;
          fg = grey;
          bg = white;
          style = SWT.NORMAL;

          char styleChar;
          String text;

          if (line.length() < 2) {
            styleChar = ' ';
            text = " " + lineSeparator;
          } else {
            styleChar = line.charAt(0);
            text = line.substring(1) + lineSeparator;
          }

          switch (styleChar) {
            case '*':
              text = "  * " + text;
              fg = green;
              setStyle = true;
              break;
            case '+':
              text = "     " + text;
              fg = black;
              bg = light;
              style = SWT.BOLD;
              setStyle = true;
              break;
            case '!':
              style = SWT.BOLD;
              setStyle = true;
              break;
            case '@':
              fg = blue;
              setStyle = true;
              break;
            case '$':
              bg = blue;
              fg = white;
              style = SWT.BOLD;
              setStyle = true;
              break;
            case ' ':
              text = "  " + text;
              break;
             
            default:
              text = styleChar + text;
          }

          helpPanel.append(text);

          if (setStyle) {
            int lineCount = helpPanel.getLineCount() - 1;
            int charCount = helpPanel.getCharCount();
            //          System.out.println("Got Linecount " + lineCount + ", Charcount " + charCount);

            int lineOfs = helpPanel.getOffsetAtLine(lineCount - 1);
            int lineLen = charCount - lineOfs;
            //          System.out.println("Setting Style : " + lineOfs + ", " + lineLen);
            helpPanel.setStyleRange(new StyleRange(lineOfs, lineLen, fg, bg,
                style));
            helpPanel.setLineBackground(lineCount - 1, 1, bg);
          }
        }

        helpPanel.setRedraw(true);
      } catch (Exception e) {
        System.out.println("Unable to load help contents because:" + e);
        //e.printStackTrace();
      }
    }
View Full Code Here

Examples of org.eclipse.swt.custom.StyledText

      }
     
      shell.setText(MessageText.getString("sharing.progress.title"));
     

      tasks = new StyledText(shell, SWT.READ_ONLY | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER)
      tasks.setBackground(dialog_display.getSystemColor(SWT.COLOR_WHITE));     
     
      progress = new ProgressBar(shell, SWT.NULL);
      progress.setMinimum(0);
      progress.setMaximum(100);           
View Full Code Here

Examples of org.eclipse.swt.custom.StyledText

   
    label = new Label(panel, SWT.NULL);
   
      // blah
   
    textResults = new StyledText(panel, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.WRAP );
    gridData = new GridData(GridData.FILL_BOTH);
    gridData.heightHint = 70;
    gridData.horizontalSpan = 4;
    textResults.setLayoutData(gridData);
    textResults.setBackground(panel.getDisplay().getSystemColor(SWT.COLOR_WHITE));
View Full Code Here

Examples of org.eclipse.swt.custom.StyledText

       cancel_button.setEnabled( false );
      
       
      // log area
   
    log = new StyledText(main,SWT.READ_ONLY | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
    grid_data = new GridData(GridData.FILL_BOTH);
    grid_data.horizontalSpan = 1;
    grid_data.horizontalIndent = 4;
    log.setLayoutData(grid_data);
    log.setIndent( 4 );
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.