Logo Search packages:      
Sourcecode: wims version File versions  Download package

void edu::hws::jcm::draw::LimitControlPanel::addButtons ( int  buttonSet  )  [inline]

Add the buttons in buttonSet to the panel, if they are not already there. buttonSet should be formed by or-ing together some of the constants SET_LIMITS, ZOOM_IN, etc.

Definition at line 341 of file LimitControlPanel.java.

References addComponent(), addComponentPair(), buttons, EQUALIZE, RESTORE, SAVE, SET_LIMITS, ZOOM_IN, and ZOOM_OUT.

Referenced by LimitControlPanel(), and GenericGraphApplet::setUpLimitsPanel().

                                         {
      if ( (buttonSet & SET_LIMITS) != 0 && (buttons & SET_LIMITS) == 0
                    && (buttonSet & EQUALIZE) != 0 && (buttons & EQUALIZE) == 0 )
         addComponentPair( makeButton(0), makeButton(1) );
      else if ( (buttonSet & SET_LIMITS) != 0 && (buttons & SET_LIMITS) == 0 )
         addComponent( makeButton(0) );
      else if ( (buttonSet & EQUALIZE) != 0 && (buttons & EQUALIZE) == 0 )
         addComponent( makeButton(1) );
         
      if ( (buttonSet & ZOOM_IN) != 0 && (buttons & ZOOM_IN) == 0
                    && (buttonSet & ZOOM_OUT) != 0 && (buttons & ZOOM_OUT) == 0 )
         addComponentPair( makeButton(2), makeButton(3) );
      else if ( (buttonSet & ZOOM_IN) != 0 && (buttons & ZOOM_IN) == 0 )
         addComponent( makeButton(2) );
      else if ( (buttonSet & ZOOM_OUT) != 0 && (buttons & ZOOM_OUT) == 0 )
         addComponent( makeButton(3) );
              
      if ( (buttonSet & SAVE) != 0 && (buttons & SAVE) == 0
                    && (buttonSet & RESTORE) != 0 && (buttons & RESTORE) == 0 )
         addComponentPair( makeButton(4), makeButton(5) );
      else if ( (buttonSet & SAVE) != 0 && (buttons & SAVE) == 0 )
         addComponent( makeButton(4) );
      else if ( (buttonSet & RESTORE) != 0 && (buttons & RESTORE) == 0 )
         addComponent( makeButton(5) );
              
      buttons = buttons | buttonSet;
   }


Generated by  Doxygen 1.6.0   Back to index