Package com.github.gwtbootstrap.client.ui

Examples of com.github.gwtbootstrap.client.ui.CheckBox


        return horiz;
    }

    private Widget checkBoxEditor( final RuleAttribute at,
                                   final boolean isReadOnly ) {
        final CheckBox box = new CheckBox();
        box.setEnabled( !isReadOnly );
        if ( at.getValue() == null || at.getValue().isEmpty() ) {
            box.setValue( false );
            at.setValue( FALSE_VALUE );
        } else {
            box.setValue( ( at.getValue().equals( TRUE_VALUE ) ) );
        }

        box.addClickHandler( new ClickHandler() {
            public void onClick( ClickEvent event ) {
                at.setValue( ( box.getValue() ) ? TRUE_VALUE : FALSE_VALUE );
            }
        } );
        return box;
    }
View Full Code Here


            public void onClick( ClickEvent event ) {
                hide();
            }
        } );

        CheckBox chkOnlyDisplayDSLConditions = new CheckBox();
        chkOnlyDisplayDSLConditions.setText( Constants.INSTANCE.OnlyDisplayDSLConditions() );
        chkOnlyDisplayDSLConditions.setValue( bOnlyShowDSLConditions );
        chkOnlyDisplayDSLConditions.addValueChangeHandler( new ValueChangeHandler<Boolean>() {

            public void onValueChange( ValueChangeEvent<Boolean> event ) {
                bOnlyShowDSLConditions = event.getValue();
                choicesPanel.setWidget( makeChoicesListBox() );
            }
View Full Code Here

     * An editor for whether the column is hidden or not
     * @param col
     * @return
     */
    public static CheckBox getHideColumnIndicator( final DTColumnConfig52 col ) {
        final CheckBox chkHide = new CheckBox();
        chkHide.setValue( col.isHideColumn() );
        chkHide.addClickHandler( new ClickHandler() {
            public void onClick( ClickEvent sender ) {
                col.setHideColumn( chkHide.getValue() );
            }
        } );
        return chkHide;
    }
View Full Code Here

        choicesPanel.add( choices );
        layoutPanel.addRow( choicesPanel );

        //DSL might be prohibited (e.g. editing a DRL file. Only DSLR files can contain DSL)
        if ( ruleModeller.isDSLEnabled() ) {
            CheckBox chkOnlyDisplayDSLConditions = new CheckBox();
            chkOnlyDisplayDSLConditions.setText( GuidedRuleEditorResources.CONSTANTS.OnlyDisplayDSLConditions() );
            chkOnlyDisplayDSLConditions.setValue( onlyShowDSLStatements );
            chkOnlyDisplayDSLConditions.addValueChangeHandler( new ValueChangeHandler<Boolean>() {

                public void onValueChange( ValueChangeEvent<Boolean> event ) {
                    onlyShowDSLStatements = event.getValue();
                    choicesPanel.setWidget( makeChoicesListBox() );
                }
View Full Code Here

        return horiz;
    }

    private Widget checkBoxEditor( final RuleAttribute at,
                                   final boolean isReadOnly ) {
        final CheckBox box = new CheckBox();
        box.setEnabled( !isReadOnly );
        if ( at.getValue() == null || at.getValue().isEmpty() ) {
            box.setValue( false );
            at.setValue( FALSE_VALUE );
        } else {
            box.setValue( ( at.getValue().equals( TRUE_VALUE ) ) );
        }

        box.addClickHandler( new ClickHandler() {
            public void onClick( ClickEvent event ) {
                at.setValue( ( box.getValue() ) ? TRUE_VALUE : FALSE_VALUE );
            }
        } );
        return box;
    }
View Full Code Here

        choicesPanel.add( choices );
        layoutPanel.addRow( choicesPanel );

        //DSL might be prohibited (e.g. editing a DRL file. Only DSLR files can contain DSL)
        if ( ruleModeller.isDSLEnabled() ) {
            CheckBox chkOnlyDisplayDSLConditions = new CheckBox();
            chkOnlyDisplayDSLConditions.setText( GuidedRuleEditorResources.CONSTANTS.OnlyDisplayDSLActions() );
            chkOnlyDisplayDSLConditions.setValue( onlyShowDSLStatements );
            chkOnlyDisplayDSLConditions.addValueChangeHandler( new ValueChangeHandler<Boolean>() {

                public void onValueChange( ValueChangeEvent<Boolean> event ) {
                    onlyShowDSLStatements = event.getValue();
                    choicesPanel.setWidget( makeChoicesListBox() );
                }
View Full Code Here

    }

    private Widget doInsertLogical() {
        HorizontalPanel hp = new HorizontalPanel();

        final CheckBox cb = new CheckBox();
        cb.setValue( editingCol.isInsertLogical() );
        cb.setText( "" );
        cb.setEnabled( !isReadOnly );
        if ( !isReadOnly ) {
            cb.addClickHandler( new ClickHandler() {
                public void onClick( ClickEvent arg0 ) {
                    if ( oracle.isGlobalVariable( editingCol.getBoundName() ) ) {
                        cb.setEnabled( false );
                        editingCol.setInsertLogical( false );
                    } else {
                        editingCol.setInsertLogical( cb.getValue() );
                    }
                }
            } );
        }
        hp.add( cb );
View Full Code Here

        eventsContainer.add( vp );
    }

    private Widget makeEventTypeCheckBox( final String eventType,
                                          final Boolean isEnabled ) {
        final CheckBox chkEventType = new CheckBox( AuditLogEntryCellHelper.getEventTypeDisplayText( eventType ) );
        chkEventType.setValue( Boolean.TRUE.equals( isEnabled ) );
        chkEventType.addValueChangeHandler( new ValueChangeHandler<Boolean>() {

            @Override
            public void onValueChange( ValueChangeEvent<Boolean> event ) {
                auditLog.getAuditLogFilter().getAcceptedTypes().put( eventType,
                                                                     event.getValue() );
View Full Code Here

     * An editor for whether the column is hidden or not
     * @param col
     * @return
     */
    public static CheckBox getHideColumnIndicator( final DTColumnConfig52 col ) {
        final CheckBox chkHide = new CheckBox();
        chkHide.setValue( col.isHideColumn() );
        chkHide.addClickHandler( new ClickHandler() {
            public void onClick( ClickEvent sender ) {
                col.setHideColumn( chkHide.getValue() );
            }
        } );
        return chkHide;
    }
View Full Code Here

        } );
        pop.addAttribute( GuidedDecisionTableConstants.INSTANCE.Binding(),
                          binding );

        //Patterns can be negated, i.e. "not Pattern(...)"
        final CheckBox chkNegated = new CheckBox();
        chkNegated.addClickHandler( new ClickHandler() {

            public void onClick( ClickEvent event ) {
                boolean isPatternNegated = chkNegated.getValue();
                binding.setEnabled( !isPatternNegated );
            }

        } );
        pop.addAttribute( GuidedDecisionTableConstants.INSTANCE.negatePattern(),
                          chkNegated );

        Button ok = new Button( GuidedDecisionTableConstants.INSTANCE.OK() );
        ok.addClickHandler( new ClickHandler() {
            public void onClick( ClickEvent w ) {

                boolean isPatternNegated = chkNegated.getValue();
                String ft = types.getItemText( types.getSelectedIndex() );
                String fn = isPatternNegated ? "" : binding.getText();
                if ( !isPatternNegated ) {
                    if ( fn.equals( "" ) ) {
                        Window.alert( GuidedDecisionTableConstants.INSTANCE.PleaseEnterANameForFact() );
View Full Code Here

TOP

Related Classes of com.github.gwtbootstrap.client.ui.CheckBox

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.