本文整理匯總了Java中org.eclipse.swt.custom.SashForm類的典型用法代碼示例。如果您正苦於以下問題:Java SashForm類的具體用法?Java SashForm怎麽用?Java SashForm使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
SashForm類屬於org.eclipse.swt.custom包,在下文中一共展示了SashForm類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: DashboardComposite
import org.eclipse.swt.custom.SashForm; //導入依賴的package包/類
/** {@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 });
}
示例2: createPartControl
import org.eclipse.swt.custom.SashForm; //導入依賴的package包/類
/**
* 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 });
}
示例3: createControl
import org.eclipse.swt.custom.SashForm; //導入依賴的package包/類
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());
}
示例4: createContents
import org.eclipse.swt.custom.SashForm; //導入依賴的package包/類
@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;
}
示例5: createDialogArea
import org.eclipse.swt.custom.SashForm; //導入依賴的package包/類
/**
* 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;
}
示例6: createDialogArea
import org.eclipse.swt.custom.SashForm; //導入依賴的package包/類
/**
* 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;
}
示例7: createDialogArea
import org.eclipse.swt.custom.SashForm; //導入依賴的package包/類
/**
* 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;
}
示例8: createSourceTable
import org.eclipse.swt.custom.SashForm; //導入依賴的package包/類
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();
}
示例9: createDialogArea
import org.eclipse.swt.custom.SashForm; //導入依賴的package包/類
/**
* 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;
}
示例10: createContent
import org.eclipse.swt.custom.SashForm; //導入依賴的package包/類
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});
}
示例11: createPartControl
import org.eclipse.swt.custom.SashForm; //導入依賴的package包/類
@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();
}
示例12: createControl
import org.eclipse.swt.custom.SashForm; //導入依賴的package包/類
/**
* {@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();
}
示例13: main
import org.eclipse.swt.custom.SashForm; //導入依賴的package包/類
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();
}
示例14: createDialogArea
import org.eclipse.swt.custom.SashForm; //導入依賴的package包/類
@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;
}
示例15: initFacetSf
import org.eclipse.swt.custom.SashForm; //導入依賴的package包/類
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);
}