Examples of SashForm


Examples of org.eclipse.swt.custom.SashForm

    progressIndicatorData.heightHint = 20;
    progressIndicatorData.minimumWidth = 180;
    testProgressIndicator = new TestResultProgressBar(this, SWT.NONE);
    testProgressIndicator.setLayoutData(progressIndicatorData);

    SashForm resultsSashForm = new SashForm(this, SWT.VERTICAL);
    GridData sashFormData = new GridData();
    sashFormData.horizontalSpan = 3;
    sashFormData.horizontalAlignment = SWT.FILL;
    sashFormData.grabExcessHorizontalSpace = true;
    sashFormData.grabExcessVerticalSpace = true;
    sashFormData.heightHint = 340;
    sashFormData.verticalAlignment = SWT.FILL;
    resultsSashForm.setLayoutData(sashFormData);
    testResultsTree = new TreeViewer(resultsSashForm, SWT.NONE);
    testResultsTree.getTree().setLayoutData(sashFormData);
    testResultsTree.setLabelProvider(new TestResultsTreeLabelProvider());
    testResultsTree.setContentProvider(new TestResultsTreeContentProvider());
    testResultsTree.setInput(testRunResult);
View Full Code Here

Examples of org.eclipse.swt.custom.SashForm

    IPath path = script.getFullPath().removeFileExtension();
    String pathString = path.removeFirstSegments(2).toPortableString().replaceAll("[/]", ".");
    tInfoPanel.setFilename(pathString);

    sash = new SashForm(overlay, SWT.HORIZONTAL);
    sash.setLayoutData(new GridData(GridData.FILL_BOTH));

    listviewer = new TableViewer(sash, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    labelProvider = new ListLabelProvider();
    listviewer.setLabelProvider(labelProvider);
View Full Code Here

Examples of org.eclipse.swt.custom.SashForm

    statusBar.setLayout(layout);
    statusLabel = new Label(statusBar, SWT.NONE);
    statusLabel.setText("Code Conjurer");

    /* SashForm for content */
    SashForm sashForm = new SashForm(top, SWT.MULTI);
    sashForm.setBackground(parent.getDisplay().getSystemColor(
        SWT.COLOR_WHITE));
    sashForm.setOrientation(SWT.HORIZONTAL);
    sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));

    resultTree = new ResultTree(sashForm);

    if (preview != null) {
      sashForm.setWeights(new int[] { 2, 3 });
    }

    preview = new CodePreview(sashForm);

    ISelectionChangedListener listener = new TreeSelectionChangedListener(
View Full Code Here

Examples of org.eclipse.swt.custom.SashForm

    banner.setLayout(layout);
    statusLabel = new Label(banner, SWT.NONE);
    statusLabel.setText("Code Conjurer");

    /* SashForm for content */
    SashForm sashForm = new SashForm(top, SWT.MULTI);
    sashForm.setBackground(parent.getDisplay().getSystemColor(
        SWT.COLOR_WHITE));
    sashForm.setOrientation(SWT.HORIZONTAL);
    sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));

    ISelectionChangedListener listener = new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        IStructuredSelection selection = (IStructuredSelection) event
            .getSelection();
        BodyDeclaration selected = (BodyDeclaration) selection
            .getFirstElement();

        // Show the source code of the selection
        if (preview != null) {
          if (selected != null)
            preview.setCode(selected.toString());
          else
            preview.setCode("");
        }
      }
    };

    resultTree = new ResultTree(sashForm, SWT.BORDER, listener);

    preview = new CodePreview(sashForm);

    if (preview != null) {
      sashForm.setWeights(new int[] { 2, 3 });
    }

    CodeConjurer.getInstance().addSearchEventListener(this);
    getSite().getPage().addPartListener(this);

View Full Code Here

Examples of org.eclipse.swt.custom.SashForm

    banner.setLayout(layout);
    statusLabel = new Label(banner, SWT.NONE);
    statusLabel.setText("Code Conjurer");

    /* SashForm for content */
    SashForm sashForm = new SashForm(top, SWT.MULTI);
    sashForm.setBackground(parent.getDisplay().getSystemColor(
        SWT.COLOR_WHITE));
    sashForm.setOrientation(SWT.HORIZONTAL);
    sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));

    ISelectionChangedListener listener = new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        IStructuredSelection selection = (IStructuredSelection) event
            .getSelection();
        BodyDeclaration selected = (BodyDeclaration) selection
            .getFirstElement();

        // Show the source code of the selection
        if (preview != null) {
          if (selected != null)
            preview.setCode(selected.toString());
          else
            preview.setCode("");
        }
      }
    };

    resultTree = new ResultTree(sashForm, SWT.BORDER, listener);

    preview = new CodePreview(sashForm);

    if (preview != null) {
      sashForm.setWeights(new int[] { 2, 3 });
    }

    CodeConjurer.getInstance().addSearchEventListener(this);
    getSite().getPage().addPartListener(this);

View Full Code Here

Examples of org.eclipse.swt.custom.SashForm

    statusBar.setLayout(layout);
    statusLabel = new Label(statusBar, SWT.NONE);
    statusLabel.setText("Code Conjurer");

    /* SashForm for content */
    SashForm sashForm = new SashForm(top, SWT.MULTI);
    sashForm.setBackground(parent.getDisplay().getSystemColor(
        SWT.COLOR_WHITE));
    sashForm.setOrientation(SWT.HORIZONTAL);
    sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));

    resultTree = new ResultTree(sashForm);

    if (preview != null) {
      sashForm.setWeights(new int[] { 2, 3 });
    }

    preview = new CodePreview(sashForm);

    ISelectionChangedListener listener = new TreeSelectionChangedListener(
View Full Code Here

Examples of org.eclipse.swt.custom.SashForm

    tbtmNewItem.setControl(composite_3);
    composite_3.setLayout(new GridLayout(1, false));
    tbtmNewItem.setText(server.getName() +" "+RedisClient.i18nFile.getText(I18nFile.PUBLISH));
    tbtmNewItem.setImage(pubImage);
   
    SashForm sashForm_2 = new SashForm(composite_3, SWT.NONE);
    sashForm_2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
   
    Composite composite_4 = new Composite(sashForm_2, SWT.NONE);
    composite_4.setLayout(new GridLayout(1, false));
   
    Composite composite_5 = new Composite(composite_4, SWT.NONE);
    composite_5.setLayout(new GridLayout(3, false));
    composite_5.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
   
    label = new Label(composite_5, SWT.NONE);
    label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1));
    label.setText(RedisClient.i18nFile.getText(I18nFile.CHANNEL));
   
    final Text channel = new Text(composite_5, SWT.BORDER);
    channel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    channel.setBounds(0, 0, 73, 21);
    channel.addControlListener(new ControlAdapter() {
      @Override
      public void controlResized(ControlEvent e) {
        channel.setFocus();
      }
    });
   
    Composite composite_6 = new Composite(composite_4, SWT.NONE);
    composite_6.setLayout(new GridLayout(2, false));
    composite_6.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
   
    label1 = new Label(composite_6, SWT.NONE);
    label1.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1));
    label1.setText(RedisClient.i18nFile.getText(I18nFile.MESSAGE));
   
    final Text message = new Text(composite_6, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);
    message.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
    message.setBounds(0, 0, 73, 21);
   
    final Table table = new Table(sashForm_2, SWT.BORDER | SWT.FULL_SELECTION);
    table.setHeaderVisible(true);
    table.setLinesVisible(true);
    EditListener listener = new EditListener(table, false, true);
    table.addListener(SWT.MouseDown, listener);
   
    tblclmnNewColumn = new TableColumn(table, SWT.NONE);
    tblclmnNewColumn.setWidth(100);
    tblclmnNewColumn.setText(RedisClient.i18nFile.getText(I18nFile.TIME));
   
    tblclmnNewColumn_1 = new TableColumn(table, SWT.NONE);
    tblclmnNewColumn_1.setWidth(100);
    tblclmnNewColumn_1.setText(RedisClient.i18nFile.getText(I18nFile.CHANNEL));
   
    tblclmnNewColumn_2 = new TableColumn(table, SWT.NONE);
    tblclmnNewColumn_2.setWidth(100);
    tblclmnNewColumn_2.setText(RedisClient.i18nFile.getText(I18nFile.MESSAGE));
    sashForm_2.setWeights(new int[] {1, 2});
   
    btnNewButton = new Button(composite_5, SWT.NONE);
    btnNewButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    btnNewButton.setBounds(0, 0, 75, 25);
    btnNewButton.setText(RedisClient.i18nFile.getText(I18nFile.PUBLISH));
View Full Code Here

Examples of org.eclipse.swt.custom.SashForm

    text = new Text(composite, SWT.BORDER);
    text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    text.setEditable(false);

    final SashForm sashForm = new SashForm(composite_1, SWT.NONE);
    sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1,
        1));

    initTree(sashForm);

    initRootItem();

    initMenuData();

    menuTreeDBContainer = initMenuTreeDB();

    menuTableDBContainer = initMenuTableDB();

    initMenuMulti();

    final Composite composite_2 = new Composite(sashForm, SWT.NONE);
    composite_2.setLayout(new GridLayout(1, false));

    final SashForm sashForm_1 = new SashForm(composite_2, SWT.VERTICAL);
    sashForm_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true,
        1, 1));
    sashForm_1.setLocation(0, 0);

    tabFolder = new CTabFolder(sashForm_1, SWT.BORDER);
    tabFolder.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseDoubleClick(MouseEvent e) {
        if(sashForm_1.getMaximizedControl() != tabFolder){
          sashForm.setMaximizedControl(composite_2);
          sashForm_1.setMaximizedControl(tabFolder);
        }else{
          sashForm.setMaximizedControl(null);
          sashForm_1.setMaximizedControl(null);
        }
      }
    });
    tabFolder.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        if (tabFolder.getSelection() == mainTabItem)
          treeItemSelected(true);
      }
    });
    tabFolder.setSelectionBackground(Display.getCurrent().getSystemColor(
        SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));
    tabFolder.setFocus();
    tabFolder.setLayout(new GridLayout(1, false));

    mainTabItem = new CTabItem(tabFolder, SWT.NONE);
    mainTabItem.setText(i18nFile.getText(I18nFile.REDISDATAEXPLORER));

    initTable(tabFolder);

    tabFolder_1 = new CTabFolder(sashForm_1, SWT.BORDER);
    tabFolder_1.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseDoubleClick(MouseEvent e) {
        if(sashForm_1.getMaximizedControl() != tabFolder_1){
          sashForm.setMaximizedControl(composite_2);
          sashForm_1.setMaximizedControl(tabFolder_1);
        }else{
          sashForm.setMaximizedControl(null);
          sashForm_1.setMaximizedControl(null);
        }
      }
    });
    tabFolder_1.setBounds(0, 0, 156, 127);
    tabFolder_1.setSelectionBackground(Display.getCurrent().getSystemColor(
        SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));
   
    sashForm_1.setWeights(new int[] { 1, 1 });
    sashForm.setWeights(new int[] { 1, 4 });
   
    initMenuNull();

    menuTreeServer = initMenuTreeServer();
View Full Code Here

Examples of org.eclipse.swt.custom.SashForm

    btnExecNextButton = new Button(composite_4, SWT.NONE);
    btnExecNextButton.setText(RedisClient.i18nFile.getText(I18nFile.RUNFOLLOW));
    btnExecNextButton.setImage(runImage);
    btnExecNextButton.setToolTipText(RedisClient.i18nFile.getText(I18nFile.RUNFOLLOWTIP)+"\tF9");

    SashForm sashForm3 = new SashForm(composite_3, SWT.VERTICAL);
    sashForm3.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
   
    inputCmd = new StyledText(sashForm3, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);
    inputCmd.addLineStyleListener(new LineStyleListener()
    {
        public void lineGetStyle(LineStyleEvent e)
        {
            StyleRange style = new StyleRange();
            style.metrics = new GlyphMetrics(0, 0, Integer.toString(100000).length()*5);

        e.bullet = new Bullet(ST.BULLET_DOT, style);
      }
    });

    inputCmd.addControlListener(new ControlAdapter() {
      @Override
      public void controlResized(ControlEvent e) {
        inputCmd.setFocus();
      }
    });
    inputCmd.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseDown(MouseEvent e) {
        text = inputCmd;
        final Clipboard cb = new Clipboard(tabFolder.getShell().getDisplay());
        TextTransfer transfer = TextTransfer.getInstance();
            String data = (String) cb.getContents(transfer);
            if(data != null)
              menu.getItem(2).setEnabled(true);
            else
              menu.getItem(2).setEnabled(false);
           
        if(inputCmd.getSelectionText().length() > 0){
          menu.getItem(0).setEnabled(true);
          menu.getItem(1).setEnabled(true);
        }else{
          menu.getItem(0).setEnabled(false);
          menu.getItem(1).setEnabled(false);
        }
        inputCmd.setMenu(menu);
         
      }
    });
   
    tabFolder_2 = new CTabFolder(sashForm3, SWT.BORDER);

    tbtmNewItem_1 = new CTabItem(tabFolder_2, SWT.NONE);
    tbtmNewItem_1.setText(RedisClient.i18nFile.getText(I18nFile.RESULT));

    Composite composite_5 = new Composite(tabFolder_2, SWT.NONE);
    tbtmNewItem_1.setControl(composite_5);
    composite_5.setLayout(new GridLayout(1, false));
   
    cmdResult = new StyledText(composite_5, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);
    cmdResult.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
    cmdResult.setEditable(false);
    cmdResult.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseDown(MouseEvent e) {
        text = cmdResult;
        menu.getItem(0).setEnabled(false);
        menu.getItem(2).setEnabled(false);
        if(cmdResult.getSelectionText().length() > 0){
          menu.getItem(1).setEnabled(true);
        }else{
          menu.getItem(1).setEnabled(false);
        }
        cmdResult.setMenu(menu);
         
      }
    });
   
    tabFolder.setSelection(tbtmNewItem);
    tabFolder_2.setSelection(tbtmNewItem_1);
    inputCmd.setFocus();

    sashForm3.setWeights(new int[] { 1, 1 });
   
    session = new RedisSession(server.getHost(), Integer.parseInt(server.getPort()));
    try {
      session.connect();
    } catch (IOException e) {
View Full Code Here

Examples of org.eclipse.swt.custom.SashForm

  public void createControl() {

      setLayout(createGridLayout());
      setLayoutData(createFillGridData());

    sashForm = new SashForm(this, SWT.VERTICAL);
    sashForm.setLayout(createGridLayout());
        sashForm.setLayoutData(createFillGridData());
    sashForm.setSashWidth(10);

    createInfoViewer(sashForm);
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.