Search in sources :

Example 96 with Combo

use of org.eclipse.swt.widgets.Combo in project cubrid-manager by CUBRID.

the class SettingHostPage method createControl.

/* (non-Javadoc)
	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
	 */
public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    container.setLayout(new FormLayout());
    setControl(container);
    setDescription(Messages.descSettingHostPage);
    setPageComplete(false);
    Composite leftComposite = new Composite(container, SWT.NONE);
    leftComposite.setLayout(new GridLayout(2, false));
    FormData leftData = new FormData();
    leftData.top = new FormAttachment(0, 5);
    leftData.bottom = new FormAttachment(100, 0);
    leftData.left = new FormAttachment(0, 5);
    leftData.right = new FormAttachment(50, -5);
    leftComposite.setLayoutData(leftData);
    Label separator = new Label(container, SWT.SEPARATOR);
    FormData separatorData = new FormData();
    separatorData.top = new FormAttachment(0, 5);
    separatorData.bottom = new FormAttachment(100, -5);
    separatorData.left = new FormAttachment(50, -5);
    separatorData.right = new FormAttachment(50, 5);
    separator.setLayoutData(separatorData);
    Composite rightComposite = new Composite(container, SWT.NONE);
    rightComposite.setLayout(new GridLayout(3, false));
    FormData rightData = new FormData();
    rightData.top = new FormAttachment(0, 5);
    rightData.bottom = new FormAttachment(100, 0);
    rightData.left = new FormAttachment(50, 5);
    rightData.right = new FormAttachment(100, -5);
    rightComposite.setLayoutData(rightData);
    /*Create left widget*/
    Label hostALabel = new Label(leftComposite, SWT.None);
    hostALabel.setLayoutData(CommonUITool.createGridData(1, 1, -1, -1));
    hostALabel.setText(Messages.lblMaster);
    masterHostText = new Text(leftComposite, SWT.BORDER);
    masterHostText.setEnabled(false);
    masterHostText.setLayoutData(CommonUITool.createGridData(GridData.FILL_HORIZONTAL, 1, 1, -1, -1));
    Label masterNameLabel = new Label(leftComposite, SWT.None);
    masterNameLabel.setLayoutData(CommonUITool.createGridData(1, 1, -1, -1));
    masterNameLabel.setText(Messages.lblMasterHost);
    masterHostName = new Text(leftComposite, SWT.BORDER);
    masterHostName.setLayoutData(CommonUITool.createGridData(GridData.FILL_HORIZONTAL, 1, 1, -1, -1));
    masterHostName.addModifyListener(new ModifyListener() {

        public void modifyText(ModifyEvent e) {
            validate();
        }
    });
    masterDBList = new org.eclipse.swt.widgets.List(leftComposite, SWT.BORDER);
    masterDBList.setLayoutData(CommonUITool.createGridData(GridData.FILL_BOTH, 2, 1, -1, -1));
    masterDBList.addSelectionListener(new SelectionListener() {

        public void widgetSelected(SelectionEvent e) {
            widgetDefaultSelected(e);
        }

        public void widgetDefaultSelected(SelectionEvent e) {
            validate();
        }
    });
    /*Create right widget*/
    Label hostBLabel = new Label(rightComposite, SWT.None);
    hostBLabel.setLayoutData(CommonUITool.createGridData(1, 1, -1, -1));
    hostBLabel.setText(Messages.lblSlave);
    slaveHostCombo = new Combo(rightComposite, SWT.READ_ONLY);
    slaveHostCombo.setLayoutData(CommonUITool.createGridData(GridData.FILL_HORIZONTAL, 2, 1, -1, -1));
    slaveHostCombo.addSelectionListener(new SelectionListener() {

        public void widgetSelected(SelectionEvent e) {
            widgetDefaultSelected(e);
        }

        public void widgetDefaultSelected(SelectionEvent e) {
            selectedSlaveServer = null;
            String serverName = slaveHostCombo.getText();
            List<CubridServer> serverList = CMHostNodePersistManager.getInstance().getAllServers();
            for (CubridServer server : serverList) {
                if (serverName.equals(server.getName())) {
                    selectedSlaveServer = server;
                    break;
                }
            }
            initSlaveDBList(selectedSlaveServer);
            validate();
        }
    });
    Label slaveNameLabel = new Label(rightComposite, SWT.None);
    slaveNameLabel.setLayoutData(CommonUITool.createGridData(1, 1, -1, -1));
    slaveNameLabel.setText(Messages.lblSlaveHost);
    slaveHostName = new Text(rightComposite, SWT.BORDER);
    slaveHostName.setLayoutData(CommonUITool.createGridData(GridData.FILL_HORIZONTAL, 2, 1, -1, -1));
    slaveHostName.addModifyListener(new ModifyListener() {

        public void modifyText(ModifyEvent e) {
            validate();
        }
    });
    slaveDBList = new org.eclipse.swt.widgets.List(rightComposite, SWT.BORDER);
    slaveDBList.setLayoutData(CommonUITool.createGridData(GridData.FILL_BOTH, 3, 1, -1, -1));
    slaveDBList.addSelectionListener(new SelectionListener() {

        public void widgetSelected(SelectionEvent e) {
            widgetDefaultSelected(e);
        }

        public void widgetDefaultSelected(SelectionEvent e) {
            validate();
        }
    });
    init();
}
Also used : FormLayout(org.eclipse.swt.layout.FormLayout) FormData(org.eclipse.swt.layout.FormData) Composite(org.eclipse.swt.widgets.Composite) ModifyListener(org.eclipse.swt.events.ModifyListener) Label(org.eclipse.swt.widgets.Label) Text(org.eclipse.swt.widgets.Text) Combo(org.eclipse.swt.widgets.Combo) CubridServer(com.cubrid.common.ui.spi.model.CubridServer) GridLayout(org.eclipse.swt.layout.GridLayout) ModifyEvent(org.eclipse.swt.events.ModifyEvent) SelectionEvent(org.eclipse.swt.events.SelectionEvent) List(java.util.List) FormAttachment(org.eclipse.swt.layout.FormAttachment) SelectionListener(org.eclipse.swt.events.SelectionListener)

Example 97 with Combo

use of org.eclipse.swt.widgets.Combo in project cubrid-manager by CUBRID.

the class UserPasswordInputDialog method createDialogArea.

protected Control createDialogArea(Composite parent) {
    Composite composite = (Composite) super.createDialogArea(parent);
    Composite newComposite = new Composite(composite, SWT.NONE);
    newComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
    layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
    layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
    layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
    newComposite.setLayout(layout);
    setTitle(Messages.titleUserPassword);
    setMessage(Messages.msgInputNamePassword, IMessageProvider.INFORMATION);
    Label lblUserName = new Label(newComposite, SWT.NONE);
    lblUserName.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, true, 1, 1));
    lblUserName.setText(Messages.lblUserName);
    userName = new Text(newComposite, SWT.BORDER);
    userName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
    userName.addModifyListener(new ModifyListener() {

        public void modifyText(ModifyEvent e) {
            validateInput();
        }
    });
    Label lblPassword = new Label(newComposite, SWT.NONE);
    lblPassword.setText(Messages.lblPassword);
    lblPassword.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, true, 1, 1));
    userPassword = new Text(newComposite, SWT.BORDER | SWT.PASSWORD);
    userPassword.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
    userPassword.addModifyListener(new ModifyListener() {

        public void modifyText(ModifyEvent e) {
            validateInput();
        }
    });
    Label lblJdbcDriver = new Label(newComposite, SWT.NONE);
    lblJdbcDriver.setText(Messages.lblJdbcVersion);
    lblJdbcDriver.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, true, 1, 1));
    jdbcDriver = new Combo(newComposite, SWT.BORDER);
    jdbcDriver.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));
    jdbcDriver.add("Auto Detect", 0);
    initJdbcDriver();
    jdbcDriver.select(0);
    applyDialogFont(newComposite);
    return composite;
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) ModifyEvent(org.eclipse.swt.events.ModifyEvent) Composite(org.eclipse.swt.widgets.Composite) ModifyListener(org.eclipse.swt.events.ModifyListener) GridData(org.eclipse.swt.layout.GridData) Label(org.eclipse.swt.widgets.Label) Text(org.eclipse.swt.widgets.Text) Combo(org.eclipse.swt.widgets.Combo)

Example 98 with Combo

use of org.eclipse.swt.widgets.Combo in project cubrid-manager by CUBRID.

the class SelectDbPage method createControl.

/**
	 * Create the control for this page
	 * 
	 * @param parent Composite
	 */
public void createControl(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.marginHeight = 10;
    layout.marginWidth = 10;
    composite.setLayout(layout);
    GridData gridData = new GridData(GridData.FILL_BOTH);
    composite.setLayoutData(gridData);
    Group dbInfoGroup = new Group(composite, SWT.NONE);
    dbInfoGroup.setText(Messages.grpSelectDb);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    dbInfoGroup.setLayoutData(gridData);
    layout = new GridLayout();
    layout.numColumns = 2;
    dbInfoGroup.setLayout(layout);
    Label dbNameLabel = new Label(dbInfoGroup, SWT.LEFT);
    dbNameLabel.setText(Messages.lblDbName);
    dbNameLabel.setLayoutData(CommonUITool.createGridData(1, 1, -1, -1));
    dbNameCombo = new Combo(dbInfoGroup, SWT.LEFT | SWT.BORDER | SWT.READ_ONLY);
    dbNameCombo.setLayoutData(CommonUITool.createGridData(GridData.FILL_HORIZONTAL, 1, 1, 100, -1));
    dbNameCombo.addModifyListener(this);
    Label nickNameLable = new Label(dbInfoGroup, SWT.LEFT);
    nickNameLable.setText(Messages.lblNickName);
    nickNameLable.setLayoutData(CommonUITool.createGridData(1, 1, -1, -1));
    nickNameText = new Text(dbInfoGroup, SWT.LEFT | SWT.BORDER);
    nickNameText.setLayoutData(CommonUITool.createGridData(GridData.FILL_HORIZONTAL, 1, 1, -1, -1));
    Label dbaPasswordLabel = new Label(dbInfoGroup, SWT.LEFT);
    dbaPasswordLabel.setText(Messages.lblDbaPassword);
    dbaPasswordLabel.setLayoutData(CommonUITool.createGridData(1, 1, -1, -1));
    dbaPasswordText = new Text(dbInfoGroup, SWT.LEFT | SWT.BORDER | SWT.PASSWORD);
    dbaPasswordText.setLayoutData(CommonUITool.createGridData(GridData.FILL_HORIZONTAL, 1, 1, 100, -1));
    Composite btnComposite = new Composite(composite, SWT.NONE);
    RowLayout rowLayout = new RowLayout();
    rowLayout.spacing = 5;
    btnComposite.setLayout(rowLayout);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.horizontalAlignment = GridData.END;
    btnComposite.setLayoutData(gridData);
    addButton = new Button(btnComposite, SWT.NONE);
    addButton.setText(Messages.btnAddDb);
    addButton.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent event) {
            String dbName = dbNameCombo.getText();
            String dbaPassword = dbaPasswordText.getText();
            String nickName = nickNameText.getText();
            if (nickName.trim().length() == 0) {
                nickName = dbName;
            }
            //check whether this database already be added
            if (isExist(dbName, hostNode)) {
                CommonUITool.openErrorBox(Messages.bind(Messages.errDbExist, dbName));
                return;
            }
            DatabaseInfo dbInfo = serverInfo.getLoginedUserInfo().getDatabaseInfo(dbName);
            TaskExecutor executor = new CommonTaskExec(null);
            VerifyDbUserPasswordTask verifyDbUserPasswordTask = null;
            if (dbInfo.isLogined() && dbInfo.getAuthLoginedDbUserInfo().getName().equalsIgnoreCase("dba")) {
                String password = dbInfo.getAuthLoginedDbUserInfo().getNoEncryptPassword();
                if (!dbaPassword.equals(password)) {
                    CommonUITool.openErrorBox(Messages.errDbaPassowrd);
                    return;
                }
            } else {
                verifyDbUserPasswordTask = new VerifyDbUserPasswordTask(serverInfo);
                verifyDbUserPasswordTask.setDbName(dbName);
                verifyDbUserPasswordTask.setDbUser("dba");
                verifyDbUserPasswordTask.setDbPassword(dbaPassword);
                executor.addTask(verifyDbUserPasswordTask);
            }
            GetHeartbeatNodeInfoTask getHeartbeatNodeInfoTask = new GetHeartbeatNodeInfoTask(serverInfo);
            getHeartbeatNodeInfoTask.setAllDb(false);
            List<String> dbList = new ArrayList<String>();
            dbList.add(dbName);
            getHeartbeatNodeInfoTask.setDbList(dbList);
            executor.addTask(getHeartbeatNodeInfoTask);
            new ExecTaskWithProgress(executor).exec(true, true);
            if (!executor.isSuccess()) {
                if (verifyDbUserPasswordTask != null && !verifyDbUserPasswordTask.isSuccess()) {
                    dbaPasswordText.selectAll();
                    dbaPasswordText.setFocus();
                }
                return;
            }
            List<HAHostStatusInfo> haHostStatusInfoList = getHeartbeatNodeInfoTask.getHAHostStatusList();
            HADatabaseStatusInfo haDbStatusInfo = getHeartbeatNodeInfoTask.getDatabaseStatusInfo(dbName);
            HAHostStatusInfo haHostStatusInfo = getHeartbeatNodeInfoTask.getHostStatusInfo(serverInfo.getHostAddress());
            //if this database is HA Mode,will get it's active database or standby database
            List<DatabaseNode> haDbNodeList = getHADatabaseList(haDbStatusInfo, haHostStatusInfoList, true);
            if (haHostStatusInfo == null) {
                haHostStatusInfo = HAUtil.getHAHostStatusInfo(serverInfo);
                if (haDbStatusInfo != null) {
                    haHostStatusInfo.addHADatabaseStatus(haDbStatusInfo);
                }
            }
            if (haDbStatusInfo == null) {
                haDbStatusInfo = HAUtil.getHADatabaseStatusInfo(dbName, haHostStatusInfo, serverInfo);
            }
            DatabaseNode dbNode = new DatabaseNode();
            hostNode.setHostStatusInfo(haHostStatusInfo);
            dbNode.setParent(hostNode);
            dbNode.setDbName(dbName);
            dbNode.setDbUser("dba");
            dbNode.setDbPassword(dbaPassword);
            dbNode.setName(nickName);
            dbNode.setHaDatabaseStatus(haDbStatusInfo);
            dbNode.setConnected(true);
            if (haDbNodeList == null) {
                haDbNodeList = new ArrayList<DatabaseNode>();
            }
            if (dbNode.getDbStatusType() == DBStatusType.ACTIVE || dbNode.getDbStatusType() == DBStatusType.TO_BE_ACTIVE) {
                haDbNodeList.add(0, dbNode);
            } else {
                haDbNodeList.add(dbNode);
            }
            addDbNodeToTable(haDbNodeList, haHostStatusInfoList);
        }
    });
    haModeBtn = new Button(dbInfoGroup, SWT.LEFT | SWT.CHECK);
    haModeBtn.setText(Messages.btnHAMode);
    haModeBtn.setLayoutData(CommonUITool.createGridData(GridData.FILL_HORIZONTAL, 2, 1, 100, -1));
    haModeBtn.setEnabled(false);
    createTable(composite);
    dbNameCombo.setFocus();
    setTitle(Messages.titleSelectDbPage);
    setMessage(Messages.msgSelectDbPage);
    setControl(composite);
}
Also used : Group(org.eclipse.swt.widgets.Group) CommonTaskExec(com.cubrid.common.ui.spi.progress.CommonTaskExec) Composite(org.eclipse.swt.widgets.Composite) DatabaseInfo(com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) Label(org.eclipse.swt.widgets.Label) ArrayList(java.util.ArrayList) Combo(org.eclipse.swt.widgets.Combo) Text(org.eclipse.swt.widgets.Text) GetHeartbeatNodeInfoTask(com.cubrid.cubridmanager.core.mondashboard.task.GetHeartbeatNodeInfoTask) HAHostStatusInfo(com.cubrid.cubridmanager.core.mondashboard.model.HAHostStatusInfo) GridLayout(org.eclipse.swt.layout.GridLayout) TaskExecutor(com.cubrid.common.ui.spi.progress.TaskExecutor) DatabaseNode(com.cubrid.cubridmanager.ui.mondashboard.editor.model.DatabaseNode) Button(org.eclipse.swt.widgets.Button) RowLayout(org.eclipse.swt.layout.RowLayout) GridData(org.eclipse.swt.layout.GridData) SelectionEvent(org.eclipse.swt.events.SelectionEvent) ExecTaskWithProgress(com.cubrid.common.ui.spi.progress.ExecTaskWithProgress) ArrayList(java.util.ArrayList) List(java.util.List) HADatabaseStatusInfo(com.cubrid.cubridmanager.core.mondashboard.model.HADatabaseStatusInfo) VerifyDbUserPasswordTask(com.cubrid.cubridmanager.core.mondashboard.task.VerifyDbUserPasswordTask)

Example 99 with Combo

use of org.eclipse.swt.widgets.Combo in project cubrid-manager by CUBRID.

the class DiagStatusMonitorTemplateDialog method createTemplateGroup.

/**
	 * Creates template group
	 * 
	 * @param composite The composite to contains the template group
	 */
private void createTemplateGroup(Composite composite) {
    final Group group = new Group(composite, SWT.RESIZE);
    group.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    group.setLayout(new GridLayout(4, false));
    group.setText(TEMPLATE_GROUP);
    final Label nameLabel = new Label(group, SWT.NONE);
    final GridData gdNameLabel = new GridData(SWT.CENTER, SWT.CENTER, false, false);
    gdNameLabel.widthHint = 90;
    nameLabel.setLayoutData(gdNameLabel);
    nameLabel.setText(TEMPLATE_NAME);
    nameText = new Text(group, SWT.BORDER);
    final GridData gdNameText = new GridData(SWT.FILL, SWT.CENTER, true, false);
    gdNameText.widthHint = 60;
    nameText.setLayoutData(gdNameText);
    final Label samplingTermsLbl = new Label(group, SWT.NONE);
    final GridData gdSamplingTermsLbl = new GridData(SWT.CENTER, SWT.CENTER, false, false);
    gdSamplingTermsLbl.widthHint = 130;
    samplingTermsLbl.setLayoutData(gdSamplingTermsLbl);
    samplingTermsLbl.setText(SAMPLE_TERM);
    samplingTermscombo = new Combo(group, SWT.NONE);
    final GridData gdSamplingTermscombo = new GridData(SWT.FILL, SWT.CENTER, true, false);
    gdSamplingTermscombo.widthHint = 60;
    samplingTermscombo.setLayoutData(gdSamplingTermscombo);
    samplingTermscombo.setItems(samplingTermsItems);
    samplingTermscombo.setText(samplingTermsItems[0]);
    final Label descriptionLabel = new Label(group, SWT.NONE);
    final GridData gdDescriptionLabel = new GridData(SWT.CENTER, SWT.CENTER, false, false);
    gdDescriptionLabel.widthHint = 90;
    descriptionLabel.setLayoutData(gdDescriptionLabel);
    descriptionLabel.setText(TEMPLATE_DESC);
    discriptionText = new Text(group, SWT.BORDER);
    final GridData gdDiscriptionText = new GridData(SWT.FILL, SWT.CENTER, true, false);
    gdDiscriptionText.widthHint = 60;
    discriptionText.setLayoutData(gdDiscriptionText);
    ServerType serverType = serverInfo.getServerType();
    if (serverType == ServerType.BOTH || serverType == ServerType.DATABASE) {
        final Label targetDbNameLbl = new Label(group, SWT.NONE);
        final GridData gdTargetDbNameLbl = new GridData(SWT.CENTER, SWT.CENTER, false, false);
        gdTargetDbNameLbl.widthHint = 130;
        targetDbNameLbl.setLayoutData(gdTargetDbNameLbl);
        targetDbNameLbl.setText(TARGET_DB);
        targetDbNameCombo = new Combo(group, SWT.NULL);
        final GridData gdTargetDbNameCombo = new GridData(SWT.FILL, SWT.CENTER, true, false);
        gdTargetDbNameCombo.widthHint = 60;
        targetDbNameCombo.setLayoutData(gdTargetDbNameCombo);
    }
}
Also used : Group(org.eclipse.swt.widgets.Group) ServerType(com.cubrid.cubridmanager.core.common.model.ServerType) GridLayout(org.eclipse.swt.layout.GridLayout) GridData(org.eclipse.swt.layout.GridData) Label(org.eclipse.swt.widgets.Label) Text(org.eclipse.swt.widgets.Text) Combo(org.eclipse.swt.widgets.Combo)

Example 100 with Combo

use of org.eclipse.swt.widgets.Combo in project cubrid-manager by CUBRID.

the class ChartCompositePart method createSeriesList.

/**
	 * Create the sub composite of Series selection combo and its related
	 * properties such as check and color
	 *
	 * @param composite the parent composite
	 */
private void createSeriesList(Composite composite) {
    Composite comp = new Composite(composite, SWT.NONE);
    GridLayout layout = new GridLayout(3, false);
    comp.setLayout(layout);
    comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    combo = new Combo(comp, SWT.DROP_DOWN);
    for (Map.Entry<String, String> entry : valueMap.entrySet()) {
        combo.add(entry.getKey());
    }
    combo.setLayout(new GridLayout());
    combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    combo.addSelectionListener(new SelectionAdapter() {

        /**
			 * Sent when selection occurs in the control.
			 *
			 * @param event an event containing information about the selection
			 */
        public void widgetSelected(SelectionEvent event) {
            widgetDefaultSelected(event);
        }

        /**
			 * Sent when default selection occurs in the control.
			 *
			 * @param event an event containing information about the default
			 *        selection
			 */
        public void widgetDefaultSelected(SelectionEvent event) {
            String selectedItem = combo.getItem(combo.getSelectionIndex());
            boolean checked = settingMap.get(selectedItem).isChecked();
            RGB rgb = settingMap.get(selectedItem).getSeriesRgb();
            checkBtn.setSelection(checked);
            colorField.getColorSelector().setColorValue(rgb);
        }
    });
    checkBtn = new Button(comp, SWT.CHECK);
    checkBtn.setText(Messages.seriesSelectCheckBtn);
    checkBtn.addSelectionListener(new SelectionAdapter() {

        /**
			 * Sent when selection occurs in the control.
			 *
			 * @param event an event containing information about the selection
			 */
        public void widgetSelected(SelectionEvent event) {
            widgetDefaultSelected(event);
        }

        /**
			 * Sent when default selection occurs in the control.
			 *
			 * @param event an event containing information about the default
			 *        selection
			 */
        public void widgetDefaultSelected(SelectionEvent event) {
            handleUpdateSettingChange();
        }
    });
    Composite selComp = new Composite(comp, SWT.NONE);
    colorField = new ColorFieldEditor(Messages.seriesSelectColorBtnName, Messages.seriesSelectColorBtnLbl, selComp);
    colorField.getColorSelector().addListener(new IPropertyChangeListener() {

        /**
			 * Notification that a property has changed.
			 *
			 * @param event the property change event object describing which
			 *        property changed and how
			 */
        public void propertyChange(PropertyChangeEvent event) {
            handleUpdateSettingChange();
        }
    });
}
Also used : IPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) PropertyChangeEvent(org.eclipse.jface.util.PropertyChangeEvent) Composite(org.eclipse.swt.widgets.Composite) ChartComposite(org.jfree.experimental.chart.swt.ChartComposite) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) Combo(org.eclipse.swt.widgets.Combo) RGB(org.eclipse.swt.graphics.RGB) GridLayout(org.eclipse.swt.layout.GridLayout) Button(org.eclipse.swt.widgets.Button) ColorFieldEditor(org.eclipse.jface.preference.ColorFieldEditor) GridData(org.eclipse.swt.layout.GridData) SelectionEvent(org.eclipse.swt.events.SelectionEvent) Map(java.util.Map) TreeMap(java.util.TreeMap)

Aggregations

Combo (org.eclipse.swt.widgets.Combo)232 GridData (org.eclipse.swt.layout.GridData)171 Label (org.eclipse.swt.widgets.Label)164 GridLayout (org.eclipse.swt.layout.GridLayout)150 Composite (org.eclipse.swt.widgets.Composite)135 SelectionEvent (org.eclipse.swt.events.SelectionEvent)122 Text (org.eclipse.swt.widgets.Text)112 Button (org.eclipse.swt.widgets.Button)105 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)98 Group (org.eclipse.swt.widgets.Group)80 ModifyEvent (org.eclipse.swt.events.ModifyEvent)54 ModifyListener (org.eclipse.swt.events.ModifyListener)54 SelectionListener (org.eclipse.swt.events.SelectionListener)37 ArrayList (java.util.ArrayList)22 Point (org.eclipse.swt.graphics.Point)20 FormAttachment (org.eclipse.swt.layout.FormAttachment)19 FormData (org.eclipse.swt.layout.FormData)19 FormLayout (org.eclipse.swt.layout.FormLayout)18 DirectoryDialog (org.eclipse.swt.widgets.DirectoryDialog)18 ComboViewer (org.eclipse.jface.viewers.ComboViewer)16