Java 类org.eclipse.swt.custom.SashForm 实例源码

项目:n4js    文件:DashboardComposite.java   
/** {@code key} defines which data source will be used for display. */
public DashboardComposite(String key, Composite parent, int style) {
    super(parent, style);
    this.key = key;

    this.setLayout(new FillLayout());

    final SashForm sf = new SashForm(this, SWT.HORIZONTAL);
    sf.setLayout(new FillLayout());

    this.canvas = new VisualisationCanvas(sf, SWT.NONE);

    this.text = new Text(sf, SWT.LEFT | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI);
    text.setText("");

    createVisualisationControls(sf);
    sf.setWeights(new int[] { 45, 45, 10 });
}
项目:AgentWorkbench    文件:ProjectEditor.java   
/**
 * Create contents of the editor part.
 * @param parent
 */
@Override
@PostConstruct
public void createPartControl(Composite parent) {

    this.sashForm = new SashForm(parent, SWT.NONE);

    this.treeViewer = new TreeViewer(this.sashForm, SWT.BORDER);
    this.tree = this.treeViewer.getTree();

    this.tabFolder = new CTabFolder(this.sashForm, SWT.BORDER);
    this.tabFolder.setTabPosition(SWT.BOTTOM);
    this.tabFolder.setSelectionBackground(Display.getCurrent().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));

    this.tabItem = new CTabItem(this.tabFolder, SWT.NONE);
    this.tabItem.setText("New Item");

    this.tabItem_1 = new CTabItem(this.tabFolder, SWT.NONE);
    this.tabItem_1.setText("New Item");

    this.sashForm.setWeights(new int[] { 3, 10 });

}
项目:gw4e.project    文件:GW4EEditor.java   
public void createControl(Composite parent) {
    sash = new SashForm(parent, SWT.VERTICAL);
    IActionBars bars = getSite().getActionBars();
    ActionRegistry ar = getActionRegistry();

    bars.setGlobalActionHandler(ActionFactory.COPY.getId(), ar.getAction(ActionFactory.COPY.getId()));
    bars.setGlobalActionHandler(ActionFactory.PASTE.getId(), ar.getAction(ActionFactory.PASTE.getId()));

    OutLineComposite composite = new OutLineComposite(filter, sash, SWT.NONE);

    Control tree = getViewer().createControl(composite.getComposite());
    tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 10, 1));
    tree.setData(GW_WIDGET_ID,GW_OUTLINE_ELEMENTS_TREE);
    getViewer().setEditDomain(getEditDomain());
    getViewer().setEditPartFactory(gwtpf);
    getViewer().setContents(gWGraph);

    getSelectionSynchronizer().addViewer(getViewer());

}
项目:Hydrograph    文件:AddExternalJarPage.java   
@Override
protected Control createContents(Composite parent) {
    ResourcesPlugin.getWorkspace().getRoot().getProject(ExpressionEditorUtil.INSTANCE.lastString(getTitle(), Constants.SPACE));
    noDefaultAndApplyButton();
    Composite container = parent;
    container.setLayout(new GridLayout(1, false));
    this.getShell().setText(DIALOG_TITLE);
    Composite mainComposite = new Composite(container, SWT.BORDER);
    mainComposite.setLayout(new GridLayout(1, false));
    mainComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

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


    categoriesDialogSourceComposite=new CategoriesDialogSourceComposite(sashForm, this, SWT.NONE);
    categoriesDialogTargetComposite=new CategoriesDialogTargetComposite(sashForm, categoriesDialogSourceComposite, SWT.NONE);

    sashForm.setWeights(new int[] {1, 1});

    return container;
}
项目:Hydrograph    文件:AddCategoreisDialog.java   
/**
 * Create contents of the dialog.
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {
    Composite container = (Composite) super.createDialogArea(parent);
    container.setLayout(new GridLayout(1, false));
    this.getShell().setText(DIALOG_TITLE);
    Composite mainComposite = new Composite(container, SWT.BORDER);
    mainComposite.setLayout(new GridLayout(1, false));
    mainComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

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


    categoriesDialogSourceComposite=new CategoriesDialogSourceComposite(sashForm,null, SWT.NONE);
    categoriesDialogTargetComposite=new CategoriesDialogTargetComposite(sashForm,categoriesDialogSourceComposite, SWT.NONE);

    sashForm.setWeights(new int[] {1, 1});

    return container;
}
项目:Hydrograph    文件:JoinMapDialog.java   
/**
 * Create contents of the dialog.
 * 
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {
    Composite container = (Composite) super.createDialogArea(parent);
    container.setLayout(new GridLayout(1, false));
    container.getShell().setText(DIALOG_TITLE);

    SashForm composite = new SashForm(container, SWT.SMOOTH);
    composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    createInputFieldExpandBarSection(composite);

    creatFieldMappingSection(composite);

    createCopyInputToOutputFieldSection(composite);
    composite.setWeights(new int[] {215, 559, 116});

    populateJoinMapDialog();

    return container;
}
项目:Hydrograph    文件:LookupMapDialog.java   
/**
 * Create contents of the dialog.
 * 
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {
    Composite container = (Composite) super.createDialogArea(parent);
    container.setLayout(new GridLayout(1, false));
    container.getShell().setText(DIALOG_TITLE);

    SashForm composite = new SashForm(container, SWT.SMOOTH);
    composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    createInputFieldSection(composite);

    creatFieldMappingSection(composite);
    composite.setWeights(new int[] {267, 618});

    populateLookupMapDialog();

    getShell().setMinimumSize(800,500);
    return container;
}
项目:Hydrograph    文件:ExcelFormattingDialog.java   
private void createSourceTable(SashForm sashForm) {
    avaliableFieldTableViewer = new TableViewer(sashForm, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
    table_1 = avaliableFieldTableViewer.getTable();
    table_1.setLinesVisible(true);
    table_1.setHeaderVisible(true);
    avaliableFieldTableViewer.setContentProvider(new IStructuredContentProvider() {

        @Override
        public Object[] getElements(Object inputElement) {
            return ((List) inputElement).toArray();
        }
    });
    avaliableFieldTableViewer.setInput(schemaFields);

    TableViewerColumn tableViewerColumn_2 = new TableViewerColumn(avaliableFieldTableViewer, SWT.NONE);
    TableColumn tblclmnNewColumn_2 = tableViewerColumn_2.getColumn();
    tblclmnNewColumn_2.setWidth(196);
    tblclmnNewColumn_2.setText(Messages.AVAILABLE_FIELDS_HEADER);
    tableViewerColumn_2.setLabelProvider(new ColumnLabelProvider());

    attachDragListener();
}
项目:Hydrograph    文件:TransformDialog.java   
/**
 * Create contents of the dialog.
 * 
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {
    container = (Composite) super.createDialogArea(parent);
    container.setLayout(new GridLayout(3, false));
    container.getShell().setText(Messages.TRANSFORM_EDITOR);
    propertyDialogButtonBar = new PropertyDialogButtonBar(container);
    mainSashForm = new SashForm(container, SWT.SMOOTH);
    mainSashForm.setSashWidth(5);
    mainSashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 0, 0));
    createInputFieldTable(mainSashForm);
       createOperationClassGrid(mainSashForm);
    createOutputFieldTable(mainSashForm);
    if(OSValidator.isMac()){
        mainSashForm.setWeights(new int[] {54, 242, 120});
    }else{
        mainSashForm.setWeights(new int[] {67, 242, 107});
    }
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    final Point newSize = container.getShell().computeSize(screenSize.width/2, screenSize.height/2, true);
    getShell().setMinimumSize(newSize);
    return mainSashForm;
}
项目:pgsqlblocks    文件:ProcessesView.java   
private void createContent() {
    toolBar = new ToolBar(this, SWT.HORIZONTAL);
    GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
    GridLayout layout = new GridLayout();
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    SashForm sashForm = new SashForm(this, SWT.HORIZONTAL);
    sashForm.SASH_WIDTH = 2;
    sashForm.setLayoutData(layoutData);
    sashForm.setLayout(layout);

    createLeftPanel(sashForm);
    createRightPanel(sashForm);

    sashForm.setSashWidth(2);
    sashForm.setWeights(new int[] {15, 85});
}
项目:DarwinSPL    文件:DwFeatureModelConfiguratorEditor.java   
@Override
public void createPartControl(Composite parent) {
    Composite sash = new Composite(parent, SWT.NONE);
    sash.setLayout(new FillLayout());
    sash.setLayoutData(new GridData(GridData.FILL_BOTH));
    final SashForm sashForm = new SashForm(sash, SWT.HORIZONTAL);

    // Left sash
    super.createEditor(sashForm);

    // Right sash
    createConfigurationPanel(sashForm);
    sashForm.setWeights(new int[] { 4, 1});

    parent.setLayout(new GridLayout(1, false));
    super.createSliderControl(parent);

    registerListeners();
}
项目:ermasterr    文件:ERDiagramOutlinePage.java   
/**
 * {@inheritDoc}
 */
@Override
public void createControl(final Composite parent) {
    sash = new SashForm(parent, SWT.VERTICAL);

    // コンストラクタで指定したビューワの作成
    viewer.createControl(sash);

    // EditPartFactory の設定
    final ERDiagramOutlineEditPartFactory editPartFactory = new ERDiagramOutlineEditPartFactory();
    viewer.setEditPartFactory(editPartFactory);

    // グラフィカル・エディタのルート・モデルをツリー・ビューワにも設定
    viewer.setContents(diagram);

    final Canvas canvas = new Canvas(sash, SWT.BORDER);
    // サムネイル・フィギュアを配置する為の LightweightSystem
    lws = new LightweightSystem(canvas);

    resetView(registry);

    final AbstractTransferDragSourceListener dragSourceListener = new ERDiagramTransferDragSourceListener(viewer, TemplateTransfer.getInstance());
    viewer.addDragSourceListener(dragSourceListener);

    diagram.refreshOutline();
}
项目:TranskribusSwtGui    文件:SashFormWeight.java   
public static void main(String[] args) {
  Display display = new Display();
  Shell shell = new Shell(display);
  shell.setText("SashForm Test");
  // Fill the parent window with the buttons and sash
  shell.setLayout(new FillLayout());

  // Create the SashForm and the buttons
  SashForm sashForm = new SashForm(shell, SWT.VERTICAL);
  new Button(sashForm, SWT.PUSH).setText("Left");
  new Button(sashForm, SWT.PUSH).setText("Right");
  new Button(sashForm, SWT.PUSH).setText("Right2");
  new Button(sashForm, SWT.PUSH).setText("Right3");

  sashForm.setWeights(new int[] { 1, 3, 2, 3});

  shell.open();
  while (!shell.isDisposed()) {
    if (!display.readAndDispatch()) {
      display.sleep();
    }
  }
  display.dispose();

}
项目:TranskribusSwtGui    文件:HtrTextRecognitionConfigDialog.java   
@Override
protected Control createDialogArea(Composite parent) {
    Composite cont = (Composite) super.createDialogArea(parent);

    SashForm sash = new SashForm(cont, SWT.HORIZONTAL);
    sash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    sash.setLayout(new GridLayout(2, false));

    htrModelsComp = new HtrModelsComposite(sash, 0);
    htrModelsComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    Group dictGrp = new Group(sash, SWT.NONE);
    dictGrp.setLayout(new GridLayout(1, false));
    dictGrp.setText("Dictionary");

    htrDictComp = new HtrDictionaryComposite(dictGrp, 0);
    htrDictComp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

    applyConfig();

    sash.setWeights(new int[] { 80, 20 });

    return cont;
}
项目:TranskribusSwtGui    文件:FullTextSearchComposite.java   
private void initFacetSf(Group resultsGroup) {
    int noOfFacets = 4;
    SashForm facetSf = new SashForm(resultsGroup, SWT.HORIZONTAL);
    facetSf.setLayout(new GridLayout(1, false));
    facetSf.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, noOfFacets, 1));

       int[] selection = new int[] { 0 };

       noMultiCombos = true;

       String[] startItems = new String[] { "All collections" };
       collCombo = new MultiSelectionCombo(facetSf, startItems, selection, SWT.NONE, this);
       startItems = new String[] { "All documents" };
       docCombo = new MultiSelectionCombo(facetSf, startItems, selection, SWT.NONE, this);
       startItems = new String[] { "All authors" };
       authCombo = new MultiSelectionCombo(facetSf, startItems, selection, SWT.NONE, this);
       startItems = new String[] { "All uploaders" };
       uplCombo = new MultiSelectionCombo(facetSf, startItems, selection, SWT.NONE, this);

}
项目:TranskribusSwtGui    文件:PortalWidget.java   
private void reattachWidget(Position pos) {
    SashForm sf = positionSashFormMap.get(pos);
    ScrolledComposite w = widgets.get(pos);
    if (w.getParent() == sf) // already attached to SashForm -> do nothing!
        return;

    w.setParent(sf); // set parent to SashForm again

    // move to left or right side of SashForm depending on flag in position:
    if (pos.isLeftSideOfSashForm)
        w.moveAbove(null);
    else
        w.moveBelow(null);

    sf.layout(true);
}
项目:mesfavoris    文件:BookmarksView.java   
public void createPartControl(Composite parent) {
    GridLayoutFactory.fillDefaults().applyTo(parent);
    toolkit = new FormToolkit(parent.getDisplay());
    toolkit.getHyperlinkGroup().setHyperlinkUnderlineMode(HyperlinkSettings.UNDERLINE_HOVER);
    form = toolkit.createForm(parent);
    icon = BookmarksPlugin.getImageDescriptor(IUIConstants.IMG_BOOKMARKS).createImage();
    form.setImage(icon);
    GridDataFactory.fillDefaults().grab(true, true).applyTo(form);
    form.setText("Mes Favoris");
    toolkit.decorateFormHeading(form);
    GridLayoutFactory.swtDefaults().applyTo(form.getBody());
    SashForm sashForm = new SashForm(form.getBody(), SWT.VERTICAL);
    toolkit.adapt(sashForm, true, true);
    GridDataFactory.fillDefaults().grab(true, true).applyTo(sashForm);
    createTreeControl(sashForm);
    createCommentsSection(sashForm);
    makeActions();
    hookContextMenu();
    contributeToActionBars();
    getSite().setSelectionProvider(proxySelectionProvider);
    proxySelectionProvider.setCurrentSelectionProvider(bookmarksTreeViewer);
    toggleLinkAction.init();
    restoreState(memento);
    bookmarkDatabase.addListener(bookmarksListener);
    eventBroker.subscribe(BookmarksEvents.TOPIC_BOOKMARK_PROBLEMS_CHANGED, bookmarkProblemsEventHandler);
}
项目:EarthquakeBulletin    文件:EarthquakeBulletinGui.java   
@Override
protected Control createContents(final Composite parent) {
    trayIcon = new TrayIcon(this);

    menuBar = new MenuBar(this);

    searchForm = new SearchForm(this);

    sashForm = new SashForm(parent, SWT.HORIZONTAL);
    sashForm.setSashWidth((int) (sashForm.getSashWidth() * SASH_MAGNIFICATION_FACTOR));
    GridLayoutFactory.swtDefaults().applyTo(sashForm);
    GridDataFactory.fillDefaults().grab(true, true).applyTo(sashForm);

    resultsTable = new ResultsTable(sashForm, GridDataFactory.fillDefaults().grab(true, true).create(), this);

    mapCanvas = new MapCanvas(sashForm);
    sashForm.setWeights(new int[] { configuration.getInt(SHELL_SASH_WEIGHT + ".0", Defaults.SASH_WEIGHTS[0]), configuration.getInt(SHELL_SASH_WEIGHT + ".1", Defaults.SASH_WEIGHTS[1]) });

    return parent;
}
项目:eclipse-code-lines-plugin    文件:CheckboxTreeAndListGroup.java   
protected void createContents(Composite parent, int width, int height, int style)
{
    composite = new Composite(parent, style);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    layout.makeColumnsEqualWidth = true;
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    composite.setLayout(layout);
    composite.setLayoutData(new GridData(1808));
    SashForm sash = new SashForm(composite, 256);
    GridData data = new GridData(1808);
    data.horizontalSpan = 2;
    sash.setLayoutData(data);
    createTreeViewer(sash, width / 2, height);
    createListViewer(sash, width / 2, height);
    initialize();
}
项目:bts    文件:CompareViewerGeneralImpl.java   
@PostConstruct
public void postConstruct(Composite parent) {
    this.parent = parent;
    GridLayout gl_parent = new GridLayout(1, false);
    gl_parent.horizontalSpacing = 0;
    gl_parent.verticalSpacing = 0;
    gl_parent.marginHeight = 0;
    parent.setLayout(gl_parent);

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

    leftComposite = new Composite(sashForm, SWT.NONE);

    rightComposite = new Composite(sashForm, SWT.NONE);
    sashForm.setWeights(new int[] {1, 1});
    //TODO Your code here
}
项目:bts    文件:CompareViewerPassportImpl.java   
@PostConstruct
public void postConstruct(Composite parent) {
    this.parent = parent;
    GridLayout gl_parent = new GridLayout(1, false);
    gl_parent.horizontalSpacing = 0;
    gl_parent.verticalSpacing = 0;
    gl_parent.marginHeight = 0;
    parent.setLayout(gl_parent);

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

    leftComposite = new Composite(sashForm, SWT.NONE);
    loadLeftEditor();

    rightComposite = new Composite(sashForm, SWT.NONE);
    loadRightEditor();
    sashForm.setWeights(new int[] {1, 1});
    //TODO Your code here
}
项目:bts    文件:CompareViewerEgyTextImpl.java   
@PostConstruct
public void postConstruct(Composite parent) {
    this.parent = parent;
    GridLayout gl_parent = new GridLayout(1, false);
    gl_parent.horizontalSpacing = 0;
    gl_parent.verticalSpacing = 0;
    gl_parent.marginHeight = 0;
    parent.setLayout(gl_parent);

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

    leftComposite = new Composite(sashForm, SWT.NONE);
    loadLeftEditor();

    rightComposite = new Composite(sashForm, SWT.NONE);
    loadRightEditor();
    sashForm.setWeights(new int[] {1, 1});
    //TODO Your code here
}
项目:bts    文件:CompareViewerEgyLemmaImpl.java   
@PostConstruct
public void postConstruct(Composite parent) {
    this.parent = parent;
    GridLayout gl_parent = new GridLayout(1, false);
    gl_parent.horizontalSpacing = 0;
    gl_parent.verticalSpacing = 0;
    gl_parent.marginHeight = 0;
    parent.setLayout(gl_parent);

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

    leftComposite = new Composite(sashForm, SWT.NONE);
    loadLeftEditor();

    rightComposite = new Composite(sashForm, SWT.NONE);
    loadRightEditor();
    sashForm.setWeights(new int[] {1, 1});
    //TODO Your code here
}
项目:uefi_edk2_wizards_plugin    文件:ExistingModuleWizardPage.java   
private void createModuleLocationFormInput(Composite container) {
    Label infPathLabel = new Label(container, SWT.NULL);
    infPathLabel.setText("Enter the module's .inf location:");

    SashForm form = new SashForm(container, SWT.HORIZONTAL | SWT.NULL);
    form.setLayout(new GridLayout(1, false));
    form.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    form.setSashWidth(0);

    Composite infLocationPathContainer = new Composite(form, SWT.NULL);
    infLocationPathContainer.setLayout(new GridLayout(1, false));
    infLocationPathContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    infLocationPath = new Text(infLocationPathContainer, SWT.BOLD | SWT.BORDER);
    infLocationPath.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));

    Composite infBrowserBtnContainer = new Composite(form, SWT.NULL);
    infBrowserBtnContainer.setLayout(new GridLayout(1, false));
    infBrowserBtnContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    infBrowserBtn = new Button(infBrowserBtnContainer, SWT.PUSH);
    infBrowserBtn.setText("Browse");
    infBrowserBtn.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));

    form.setWeights(new int[]{7, 1});
}
项目:uefi_edk2_wizards_plugin    文件:NewLibraryClassProjectPage.java   
private void createLibraryClassHeaderPathFormInput(Composite container) {
    Label moduleRootLabel = new Label(container, SWT.NULL);
    moduleRootLabel.setText("Enter the library class header location:");

    SashForm form = new SashForm(container, SWT.HORIZONTAL | SWT.NULL);
    form.setLayout(new GridLayout(1, false));
    form.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    form.setSashWidth(0);

    Composite libraryClassHeaderPathTxtContainer = new Composite(form, SWT.NULL);
    libraryClassHeaderPathTxtContainer.setLayout(new GridLayout(1, false));
    libraryClassHeaderPathTxtContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    libraryClassHeaderPath = new Text(libraryClassHeaderPathTxtContainer, SWT.BOLD | SWT.BORDER);
    libraryClassHeaderPath.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));

    Composite libraryClassHeaderPathBtnContainer = new Composite(form, SWT.NULL);
    libraryClassHeaderPathBtnContainer.setLayout(new GridLayout(1, false));
    libraryClassHeaderPathBtnContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    libraryClassHeaderPathBtn = new Button(libraryClassHeaderPathBtnContainer, SWT.PUSH);
    libraryClassHeaderPathBtn.setText("Browse");
    libraryClassHeaderPathBtn.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));

    form.setWeights(new int[]{7, 1});
}
项目:uefi_edk2_wizards_plugin    文件:NewEdk2ModuleProjectPage.java   
private void createModuleLocationFormInput(Composite container) {
    Label moduleRootLabel = new Label(container, SWT.NULL);
    moduleRootLabel.setText("Enter the module's .inf location:");

    SashForm form = new SashForm(container, SWT.HORIZONTAL | SWT.NULL);
    form.setLayout(new GridLayout(1, false));
    form.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    form.setSashWidth(0);

    Composite moduleRootFolderTxtContainer = new Composite(form, SWT.NULL);
    moduleRootFolderTxtContainer.setLayout(new GridLayout(1, false));
    moduleRootFolderTxtContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    moduleRootFolder = new Text(moduleRootFolderTxtContainer, SWT.BOLD | SWT.BORDER);
    moduleRootFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));

    Composite moduleRootFolderBtnContainer = new Composite(form, SWT.NULL);
    moduleRootFolderBtnContainer.setLayout(new GridLayout(1, false));
    moduleRootFolderBtnContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    moduleRootFolderBtn = new Button(moduleRootFolderBtnContainer, SWT.PUSH);
    moduleRootFolderBtn.setText("Browse");
    moduleRootFolderBtn.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));

    form.setWeights(new int[]{7, 1});
}
项目:areca-backup-release-mirror    文件:LogicalViewComposite.java   
public LogicalViewComposite(Composite parent) {
    super(parent, SWT.NONE);
    this.setLayout(new FillLayout());

    SashForm sashMain = new SashForm(this, SWT.HORIZONTAL);
    sashMain.setLayout(new FillLayout());

    buildExplorerComposite(sashMain);

    SashForm sashHisto = new SashForm(sashMain, SWT.VERTICAL);
    sashHisto.setLayout(new FillLayout());

    buildHistoryComposite(sashHisto);
    buildManifestComposite(sashHisto);

    sashMain.setWeights(new int[] {60, 40});
    sashHisto.setWeights(new int[] {60, 40});
}
项目:Permo    文件:ProjectHistoryViewMainControl.java   
private void createContent() {
  final SashForm sashForm = new SashForm(this, SWT.VERTICAL);
  setRealContent(sashForm, GridDataBuilder.singleCell().alignment(SWT.FILL).grabSpace().create());

  final Composite overviewBox = new Composite(sashForm, SWT.NONE);
  overviewBox.setLayout(GridLayoutBuilder.oneColumn().noMargin().spacing(LayoutConstants.SPACING).create());

  title = new ProjectHistoryTitle(overviewBox, SWT.NONE);
  title.setLayoutData(GridDataBuilder.singleCell().alignment(SWT.FILL).grabHorizontalSpace().create());

  projectHistoryTable = new ProjectHistoryTable(overviewBox);
  projectHistoryTable.getTable().setLayoutData(GridDataBuilder.singleCell().alignment(SWT.FILL).grabSpace().create());
  projectHistoryTable.addSelectionChangedListener(new ISelectionChangedListener() {
    @Override
    public void selectionChanged(final SelectionChangedEvent event) {
      if (event.getSelection() instanceof IStructuredSelection) {
        final IStructuredSelection selection = (IStructuredSelection) event.getSelection();
        if (selection.getFirstElement() instanceof ProjectHistoryEventViewModel) {
          viewModel.setSelectedEvent((ProjectHistoryEventViewModel) selection.getFirstElement());
        }
      }
    }
  });

  new EventDetailWrapper(sashForm, viewModel);
}
项目:mipa    文件:LatticeTabUI.java   
private LatticeTabUI(TabFolder tabFolderMIPA) 
{
    TabItem tabItemLattice = new TabItem(tabFolderMIPA, SWT.NONE);
    tabItemLattice.setToolTipText("representation of lattice");
    tabItemLattice.setText("Lattice");

    SashForm sashLattice = new SashForm(tabFolderMIPA, SWT.NONE);
    tabItemLattice.setControl(sashLattice);

    StyledText styledTextLattice = new StyledText(sashLattice, SWT.BORDER
            | SWT.READ_ONLY);
    styledTextLattice.setText("Information for lattice are given here \n.");
    styledTextLattice.setToolTipText("Information for lattice.");

    Group grpLatticeTree = new Group(sashLattice, SWT.NONE);
    grpLatticeTree.setToolTipText("tree view of lattice");
    grpLatticeTree.setText("Lattice Tree View");

    latticeTreeViewer = new TreeViewer(grpLatticeTree, SWT.BORDER);
    Tree latticeTree = latticeTreeViewer.getTree();
    latticeTree.setBounds(10, 29, 444, 526);
    //latticeTreeViewer.setLabelProvider(new LatticeTreeLabelProvider());
    //latticeTreeViewer.setContentProvider(new LatticeTreeContentProvider());
    sashLattice.setWeights(new int[] { 1, 1 });
}
项目:scouter    文件:StackAnalyzerView.java   
public void createPartControl(Composite parent) {
    this.setPartName("SFA");
    MainProcessor mainProcessor = MainProcessor.instance();
    mainProcessor.setStackAnalyzerView(this);
    mainProcessor.setParentComposite(parent);
    initializeToobar();

    SashForm sashVertForm = new SashForm(parent, SWT.VERTICAL);
    sashVertForm.SASH_WIDTH = 3;
    SashForm sashHoriForm = new SashForm(sashVertForm, SWT.HORIZONTAL);
    sashHoriForm.SASH_WIDTH = 3;
    initializeTree(sashHoriForm);       
    initializeTable(sashHoriForm);
    initializeBrowser(sashVertForm);
    sashVertForm.setWeights(new int [] {55, 45});
    sashHoriForm.setWeights(new int [] {45, 55});

    createMainTreePopupMenu();
    createTablePopupMenu();

    parent.setVisible(true);

}
项目:scouter    文件:XlogSummarySQLDialog.java   
protected Control createDialogArea(Composite parent) {
    Composite container =  (Composite) super.createDialogArea(parent);
    FillLayout layout = new FillLayout();
    container.setLayout(layout);
    SashForm sashVertForm = new SashForm(container, SWT.VERTICAL);
    sashVertForm.SASH_WIDTH = 3;
    initSQLTable(sashVertForm);
    initBindTable(sashVertForm);

    sashVertForm.setWeights(new int [] {55, 45});

    processSqlData();
    displaySQLSumData();

    return container;
}
项目:org.csstudio.display.builder    文件:SearchView.java   
/** Create the 'upper' sash for selecting a server and archives
 *  @param sashform
 */
private void createServerSash(final SashForm sashform)
{
    final Composite parent = new Composite(sashform, SWT.BORDER);
    archive_gui = new ArchiveListGUI(parent)
    {
        @Override
        protected void handleArchiveUpdate()
        {
            pattern.setEnabled(true);
            search.setEnabled(true);
        }

        @Override
        protected void handleServerError(final String url, final Exception ex)
        {
            SearchView.this.handleServerError(url, ex);
        }
    };
}
项目:gwt-eclipse-plugin    文件:LogContent.java   
public LogContent(Composite parent, Log<T> log) {
  super(parent, SWT.NONE);

  this.log = log;

  setLayout(new FillLayout());
  SashForm sashForm = new SashForm(this, SWT.VERTICAL);

  createViewer(sashForm);
  createDetailsPane(sashForm, treeViewer.getTree().getBackground());

  sashForm.setWeights(new int[] {70, 30});

  revealChildrenThatNeedAttention(treeViewer, log.getRootLogEntry());

  LogEntry<T> entryToSelect = log.getFirstDeeplyNestedChildWithMaxAttn();
  if (entryToSelect != null) {
    treeViewer.setSelection(new StructuredSelection(entryToSelect));
  }
}
项目:ldparteditor    文件:Composite3DModifier.java   
/**
 * Moves the adjacent Sash auto-magically
 */
public void moveSashOnResize() {
    if (isSashFormChild(c3d.getSashForm()) && c3d.getSashForm().getParent() instanceof SashForm && isSashFormChild(c3d.getSashForm().getParent())) {
        Composite symmetricalSashAxis = c3d.getSashForm().getParent();
        if (symmetricalSashAxis.getChildren()[0] instanceof SashForm && symmetricalSashAxis.getChildren()[1] instanceof SashForm) {
            if (((SashForm) symmetricalSashAxis).getStyle() != ((SashForm) symmetricalSashAxis.getChildren()[0]).getStyle()
                    && ((SashForm) symmetricalSashAxis).getStyle() != ((SashForm) symmetricalSashAxis.getChildren()[1]).getStyle()) {
                if (symmetricalSashAxis.getChildren()[0].equals(c3d.getSashForm())) {
                    ((SashForm) symmetricalSashAxis.getChildren()[1]).setWeights(c3d.getSashForm().getWeights());
                } else {
                    ((SashForm) symmetricalSashAxis.getChildren()[0]).setWeights(c3d.getSashForm().getWeights());
                }
            }
        }
    }
}
项目:ldparteditor    文件:Editor3DWindow.java   
public ArrayList<Composite3DState> getC3DStates() {
    // Traverse the sash forms to store the 3D configuration
    final ArrayList<Composite3DState> c3dStates = new ArrayList<Composite3DState>();
    Control c = Editor3DDesign.getSashForm().getChildren()[1];
    if (c != null) {
        if (c instanceof SashForm|| c instanceof CompositeContainer) {
            // c instanceof CompositeContainer: Simple case, since its only one 3D view open -> No recursion!
            saveComposite3DStates(c, c3dStates, "", "|"); //$NON-NLS-1$ //$NON-NLS-2$
        } else {
            // There is no 3D window open at the moment
        }
    } else {
        // There is no 3D window open at the moment
    }
    return c3dStates;
}
项目:PDFReporter-Studio    文件:ATreeWizardDataEditorComposite.java   
@Override
protected void createCompositeContent() {
    // Create the editor content
    GridLayout cmpGl=new GridLayout(1,true);
    cmpGl.marginWidth=0;
    cmpGl.marginHeight=0;
    setLayout(cmpGl);

    Label title = new Label(this,SWT.NONE);
    title.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false));
    title.setText(getTitle());

    SashForm sashForm = new SashForm(this, SWT.NONE);
    sashForm.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));

    createTreeViewer(sashForm);
    createQueryTextArea(sashForm);

    qStatus=new QueryStatus(this);

    // Standard proportions
    sashForm.setWeights(new int[] {30, 70});

    refreshTreeViewerContent(getDataAdapterDescriptor());
}
项目:PDFReporter-Studio    文件:TreeBasedQueryDesigner.java   
public Control createControl(Composite parent) {
    control=new Composite(parent, SWT.NONE);
    GridLayout controlGl=new GridLayout(1,true);
    controlGl.marginWidth=0;
    controlGl.marginHeight=0;
    control.setLayout(controlGl);

    createTitleBar(control);

    SashForm sashForm = new SashForm(control, SWT.NONE);
    sashForm.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));

    createTreeViewer(sashForm);

    createQueryTextArea(sashForm);

    // Standard proportions
    sashForm.setWeights(new int[] {30, 70});
    return control;
}
项目:erflute    文件:ERDiagramOutlinePage.java   
@Override
public void createControl(Composite parent) {
    this.sash = new SashForm(parent, SWT.VERTICAL);
    viewer.createControl(sash);
    editPartFactory = new ERDiagramOutlineEditPartFactory();
    editPartFactory.setQuickMode(quickMode);
    viewer.setEditPartFactory(editPartFactory);
    viewer.setContents(diagram);
    if (!quickMode) {
        final Canvas canvas = new Canvas(sash, SWT.BORDER);
        lws = new LightweightSystem(canvas);
    }
    resetView(registry);
    final AbstractTransferDragSourceListener dragSourceListener =
            new ERDiagramTransferDragSourceListener(viewer, TemplateTransfer.getInstance());
    viewer.addDragSourceListener(dragSourceListener);

    expandVirturalDiagramTree();
}
项目:neoscada    文件:ChartView.java   
@Override
protected void activateView ()
{
    if ( this.chart != null )
    {
        return;
    }

    this.wrapper = new SashForm ( this.viewHolder, SWT.HORIZONTAL );
    this.wrapper.setLayout ( new FillLayout ( SWT.HORIZONTAL ) );

    final Composite subWrapper = new Composite ( this.wrapper, SWT.NONE );
    subWrapper.setLayout ( GridLayoutFactory.slimStack () );
    final Composite extensionSpace = new Composite ( subWrapper, SWT.NONE );
    extensionSpace.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, false ) );
    extensionSpace.setLayout ( new RowLayout ( SWT.HORIZONTAL ) );

    this.chartArea = new ChartArea ( subWrapper, SWT.NONE );
    this.chartArea.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, true ) );

    this.configuration = ChartHelper.loadConfiguraton ( this.descriptor.getUri ().toString () );
    this.chart = new ChartViewer ( this.chartArea.getDisplay (), this.chartArea.getChartRenderer (), this.configuration, new CompositeExtensionSpace ( extensionSpace ), new ResetHandler () {

        @Override
        public void reset ()
        {
            reload ();
        }
    } );

    if ( this.showSelector )
    {
        this.selector = new ChartInputSelector ( this.wrapper, this.chart, true );
        this.wrapper.setWeights ( new int[] { 85, 15 } );
    }

    this.viewManagerContext.setSelectionProvider ( this.chart );
    this.chart.setFocus ();
}
项目:convertigo-eclipse    文件:StepSourceEditorComposite.java   
private void createSashForm() {
    GridData gd = new org.eclipse.swt.layout.GridData();
    gd.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
    gd.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
    gd.grabExcessHorizontalSpace = true;
    gd.grabExcessVerticalSpace = true;
    gd.horizontalSpan = 8;
    sashForm = new SashForm(this, SWT.NONE);
    sashForm.setOrientation(SWT.VERTICAL );
    sashForm.setLayoutData(gd);
    createTreesSashForm();
    createXpathSashForm();
    sashForm.setWeights(new int[]{70,30});
}