Examples of CheckState


Examples of com.alee.extended.checkbox.CheckState

     * {@inheritDoc}
     */
    @Override
    public CheckState getCheckState ( final E node )
    {
        final CheckState checkState = nodeCheckStates.get ( node );
        return checkState != null ? checkState : CheckState.unchecked;
    }
View Full Code Here

Examples of com.alee.extended.checkbox.CheckState

     * @param changes  list to collect state changes into
     */
    protected void setCheckedImpl ( final E node, final boolean checked, final List<E> toUpdate, final List<CheckStateChange<E>> changes )
    {
        // Remembering old and new states
        final CheckState oldState = getCheckState ( node );
        final CheckState newState = checked ? CheckState.checked : CheckState.unchecked;

        // Updating node if check state has actually changed
        if ( oldState != newState )
        {
            // Changing node check state
View Full Code Here

Examples of com.alee.extended.checkbox.CheckState

        // Updating all parent node states
        E parent = ( E ) node.getParent ();
        while ( parent != null )
        {
            // Calculating parent state
            CheckState state = CheckState.unchecked;
            boolean hasChecked = false;
            boolean hasUnchecked = false;
            for ( int i = 0; i < parent.getChildCount (); i++ )
            {
                final CheckState checkState = getCheckState ( ( E ) parent.getChildAt ( i ) );
                if ( checkState == CheckState.mixed )
                {
                    state = CheckState.mixed;
                    break;
                }
                else if ( checkState == CheckState.checked )
                {
                    hasChecked = true;
                    if ( hasUnchecked )
                    {
                        state = CheckState.mixed;
                        break;
                    }
                    else
                    {
                        state = CheckState.checked;
                    }
                }
                else if ( checkState == CheckState.unchecked )
                {
                    hasUnchecked = true;
                    if ( hasChecked )
                    {
                        state = CheckState.mixed;
                        break;
                    }
                    else
                    {
                        state = CheckState.unchecked;
                    }
                }
            }

            final CheckState oldState = getCheckState ( parent );
            if ( oldState != state )
            {
                // Saving changes
                if ( changes != null )
                {
View Full Code Here

Examples of com.alee.extended.checkbox.CheckState

        if ( checkStateChangeListeners.size () > 0 )
        {
            changes = new ArrayList<CheckStateChange<E>> ( nodeCheckStates.size () );
            for ( final Map.Entry<E, CheckState> entry : nodeCheckStates.entrySet () )
            {
                final CheckState state = entry.getValue ();
                if ( state == CheckState.mixed || state == CheckState.checked )
                {
                    changes.add ( new CheckStateChange<E> ( entry.getKey (), state, CheckState.unchecked ) );
                }
            }
View Full Code Here

Examples of com.alee.extended.checkbox.CheckState

        if ( checkStateChangeListeners.size () > 0 )
        {
            changes = new ArrayList<CheckStateChange<E>> ( allNodes.size () );
            for ( final E node : allNodes )
            {
                final CheckState state = getCheckState ( node );
                if ( state != CheckState.checked )
                {
                    changes.add ( new CheckStateChange<E> ( node, state, CheckState.checked ) );
                }
            }
View Full Code Here

Examples of org.cspoker.client.common.gamestate.modifiers.CheckState

    context.checkOrCall();
  }

  @Override
  public GameState getUnwrappedStateAfterAction() {
    return new CheckState(gameState, new CheckEvent(actor));
  }
View Full Code Here

Examples of org.cspoker.client.common.gamestate.modifiers.CheckState

    super.onRaise(raiseEvent);
  }
 
  @Override
  public void onCheck(CheckEvent checkEvent) {
    tableState.setGameState(new CheckState(tableState.getGameState(), checkEvent));
    super.onCheck(checkEvent);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.