Search in sources :

Example 1 with PropEditor

use of com.cubrid.tool.editor.property.PropEditor in project cubrid-manager by CUBRID.

the class BrokerConfigEditComposite method createCubridBrokerConfPropEditor.

/**
	 * Create property editor
	 *
	 * @param cubridBrokerConfTabFolder
	 */
public void createCubridBrokerConfPropEditor(CTabFolder cubridBrokerConfTabFolder) {
    final Composite comp = new Composite(cubridBrokerConfTabFolder, SWT.NONE);
    comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    comp.setLayout(new GridLayout(1, false));
    sourceCTabItem = new CTabItem(cubridBrokerConfTabFolder, SWT.NONE);
    sourceCTabItem.setText(Messages.cubridBrokerConfEditorCTabItemSource);
    final Composite editorComp = new Composite(comp, SWT.BORDER);
    editorComp.setLayoutData(new GridData(GridData.FILL_BOTH));
    final GridLayout gridLayout = createGridLayout(1, 0, 0);
    gridLayout.horizontalSpacing = 0;
    editorComp.setLayout(gridLayout);
    propEditor = new PropEditor();
    try {
        propEditor.init(editorPart.getEditorSite(), editorPart.getEditorInput());
    } catch (PartInitException e) {
        LOGGER.error(e.getMessage(), e);
    }
    propEditor.createPartControl(editorComp);
    propEditor.getDocument().addDocumentListener(new DocumentAdpater());
    sourceCTabItem.setControl(comp);
}
Also used : CommonUITool.createGridLayout(com.cubrid.common.ui.spi.util.CommonUITool.createGridLayout) GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) PropEditor(com.cubrid.tool.editor.property.PropEditor) PartInitException(org.eclipse.ui.PartInitException) CTabItem(org.eclipse.swt.custom.CTabItem)

Example 2 with PropEditor

use of com.cubrid.tool.editor.property.PropEditor in project cubrid-manager by CUBRID.

the class EditConfigEditor method createPropEditor.

/**
	 *
	 * Create the property editor
	 *
	 * @param parent the Composite
	 */
private void createPropEditor(Composite parent) {
    final Composite editorComp = new Composite(parent, SWT.NONE);
    {
        editorComp.setLayoutData(new GridData(GridData.FILL_BOTH));
        GridLayout gridLayout = new GridLayout();
        gridLayout.marginHeight = 0;
        gridLayout.horizontalSpacing = 0;
        gridLayout.marginWidth = 0;
        editorComp.setLayout(gridLayout);
    }
    propEditor = new PropEditor();
    try {
        propEditor.init(this.getEditorSite(), this.getEditorInput());
    } catch (PartInitException ex) {
        LOGGER.error(ex.getMessage());
    }
    propEditor.createPartControl(editorComp);
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) PropEditor(com.cubrid.tool.editor.property.PropEditor) PartInitException(org.eclipse.ui.PartInitException)

Aggregations

PropEditor (com.cubrid.tool.editor.property.PropEditor)2 GridData (org.eclipse.swt.layout.GridData)2 GridLayout (org.eclipse.swt.layout.GridLayout)2 Composite (org.eclipse.swt.widgets.Composite)2 PartInitException (org.eclipse.ui.PartInitException)2 CommonUITool.createGridLayout (com.cubrid.common.ui.spi.util.CommonUITool.createGridLayout)1 CTabItem (org.eclipse.swt.custom.CTabItem)1