Package lcmc.common.ui.utils

Examples of lcmc.common.ui.utils.WidgetListener


                    public void run() {
                        wi.setEnabled(false);
                    }
                });
            }
            wi.addListeners(new WidgetListener() {
                                @Override
                                public void check(final Value value) {
                                    checkParameterFields(wi,
                                                         realParamWi,
                                                         ServiceInfo.CACHED_FIELD,
View Full Code Here


                              ADDR_COMBOBOX_WIDTH,
                              Widget.NO_ABBRV,
                              new AccessMode(AccessMode.RO, AccessMode.NORMAL),
                              Widget.NO_BUTTON);

        typeWidget.addListeners(new WidgetListener() {
            @Override
            public void check(final Value value) {
                checkInterface();
            }
        });

        ifaceWidget.addListeners(new WidgetListener() {
            @Override
            public void check(final Value value) {
                checkInterface();
            }
        });

        final String portRegexp = "^\\d+$";
        portWidget = widgetFactory.createInstance(
                Widget.GUESS_TYPE,
                new StringValue(Tools.getDefault("Dialog.Cluster.CoroConfig.DefaultMCastPort")),
                Widget.NO_ITEMS,
                portRegexp,
                PORT_COMBOBOX_WIDTH,
                Widget.NO_ABBRV,
                new AccessMode(AccessMode.RO, AccessMode.NORMAL),
                Widget.NO_BUTTON);
        portWidget.addListeners(new WidgetListener() {
            @Override
            public void check(final Value value) {
                checkInterface();
            }
        });

        addrWidget.addListeners(new WidgetListener() {
            @Override
            public void check(final Value value) {
                checkInterface();
            }
        });
View Full Code Here

        return pane;
    }

    private void addListeners() {
        /* tarball combo box */
        drbdTarballCombo.addListeners(new WidgetListener() {
            @Override
            public void check(final Value value) {
                final DrbdVersions drbdVersions = (DrbdVersions) drbdTarballCombo.getValue();
                allDone(drbdVersions);
            }
View Full Code Here

                                     Widget.NO_ABBRV,
                                     new AccessMode(AccessMode.RO, AccessMode.NORMAL),
                                     Widget.NO_BUTTON);

        typeWidget.addListeners(
                new WidgetListener() {
                    @Override
                    public void check(final Value value) {
                        final Value type = typeWidget.getValue();
                        if (type != null) {
                            if (MCAST_TYPE.equals(type) || BCAST_TYPE.equals(type)) {
                                ifaceWidget.setVisible(true);
                            } else {
                                ifaceWidget.setVisible(false);
                            }

                            if (MCAST_TYPE.equals(type)) {
                                addrWidget.setVisible(true);
                            } else {
                                addrWidget.setVisible(false);
                            }
                            if (SERIAL_TYPE.equals(type)) {
                                serialWidget.setVisible(true);
                            } else {
                                serialWidget.setVisible(false);
                            }
                            if (UCAST_TYPE.equals(type)) {
                                ucastLink1Widget.setVisible(true);
                                ucastLink2Widget.setVisible(true);
                            } else {
                                ucastLink1Widget.setVisible(false);
                                ucastLink2Widget.setVisible(false);
                            }
                            application.invokeLater(new Runnable() {
                                @Override
                                public void run() {
                                    mcastPanel.setMaximumSize(mcastPanel.getPreferredSize());
                                }
                            });
                            checkInterface();
                        }
                    }
                });

        ifaceWidget.addListeners(new WidgetListener() {
            @Override
            public void check(final Value value) {
                checkInterface();
            }
        });

        serialWidget.setVisible(false);

        serialWidget.addListeners(new WidgetListener() {
            @Override
            public void check(final Value value) {
                checkInterface();
            }
        });

        ucastLink1Widget.setVisible(false);
        ucastLink2Widget.setVisible(false);

        ucastLink1Widget.addListeners(new WidgetListener() {
            @Override
            public void check(final Value value) {
                checkInterface();
            }
        });
        ucastLink2Widget.addListeners(new WidgetListener() {
            @Override
            public void check(final Value value) {
                checkInterface();
            }
        });
        addrWidget.addListeners(new WidgetListener() {
            @Override
            public void check(final Value value) {
                checkInterface();
            }
        });
View Full Code Here

    protected boolean skipButtonEnabled() {
        return true;
    }

    private WidgetListener getOptionListener() {
        return new WidgetListener() {
            @Override
            public void check(final Value value) {
                if (fieldCheckLatch.getCount() > 0) {
                    return;
                }
View Full Code Here

            Widget rpwi = null;
            if (wizard) {
                rpwi = getWidget(param, null);
            }
            final Widget realParamWi = rpwi;
            paramWi.addListeners(new WidgetListener() {
                @Override
                public void check(final Value value) {
                    checkParameterFields(paramWi, realParamWi, param, getParametersFromXML(), thisApplyButton);
                }
            });
View Full Code Here

        mSavedOperationsLock.unlock();
        if (allAreDefaultValues && savedOpIdRef == null) {
            sameAsOperationsWi.setValue(OPERATIONS_DEFAULT_VALUES);
        }
        sameAsOperationsWi.addListeners(
                new WidgetListener() {
                    @Override
                    public void check(final Value value) {
                        final String[] params = getParametersFromXML();
                        application.invokeLater(new Runnable() {
                            @Override
View Full Code Here

    protected void addHostLocationsListeners() {
        final String[] params = getParametersFromXML();
        for (final Host host : getBrowser().getClusterHosts()) {
            final HostInfo hi = host.getBrowser().getHostInfo();
            final Widget wi = scoreComboBoxHash.get(hi);
            wi.addListeners(new WidgetListener() {
                                @Override
                                public void check(final Value value) {
                                    setApplyButtons(CACHED_FIELD, params);
                                    application.invokeLater(
                                        new Runnable() {
                                            @Override
                                            public void run() {
                                                wi.setEditable();
                                            }
                                    });
                                }
                                @Override
                                public void checkText(final String text) {
                                    setApplyButtons(CACHED_FIELD, params);
                                    final Value v = wi.getValue();
                                    if (v == null || v.isNothingSelected()) {
                                        wi.setText("");
                                    }
                                }
                            });
        }
        pingComboBox.addListeners(new WidgetListener() {
                                      @Override
                                      public void check(final Value value) {
                                          setApplyButtons(CACHED_FIELD, params);
                                      }
                                  });
View Full Code Here

            wi = operationsComboBoxHash.get(op, param);
        } finally {
            mOperationsComboBoxHashReadLock.unlock();
        }
        final String[] params = getParametersFromXML();
        wi.addListeners(new WidgetListener() {
                            @Override
                            public void check(final Value value) {
                                setApplyButtons(CACHED_FIELD, params);
                            }
                        });
View Full Code Here

            toolTip = savedMAIdRef.getValueForGui();
        }
        sameAsMetaAttrsWi.setToolTipText(toolTip);
        final Map<String, Widget> sameAsFields = new HashMap<String, Widget>();
        sameAsFields.put(Tools.getString("CRMXML.MetaAttrOptions"), sameAsMetaAttrsWi);
        sameAsMetaAttrsWi.addListeners(new WidgetListener() {
                @Override
                public void check(final Value value) {
                    final String[] params = getParametersFromXML();
                    application.invokeLater(new Runnable() {
                        @Override
View Full Code Here

TOP

Related Classes of lcmc.common.ui.utils.WidgetListener

Copyright © 2018 www.massapicom. 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.