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

void GenericGraphApplet::setUpLimitsPanel (  )  [inline, protected]

This method sets up the limit control panel and adds it to the main panel. The limit control panel already exists when this method is called and is stored in the member variable limitsPanel. The applet parameters "TwoLimitsColumns", "UseSetLimitsButton", "UseZoomButtons", "UseEqualizeButtons", "UseRestoreButton", "PanelBackground", and "LimitsOnLeft" are processed. The limits panel is set to report its errors using the display canvas.

Definition at line 325 of file GenericGraphApplet.java.

References edu::hws::jcm::draw::LimitControlPanel::addButtons(), edu::hws::jcm::draw::LimitControlPanel::addCoords(), canvas, getColorParam(), getParameter(), limitsPanel, mainPanel, edu::hws::jcm::draw::LimitControlPanel::setErrorReporter(), and edu::hws::jcm::draw::LimitControlPanel::setUseTwoColumnsIfPossible().

Referenced by setUpMainPanel().

                                     {
      limitsPanel.addCoords(canvas);
      if ( ! "no".equalsIgnoreCase(getParameter("TwoLimitsColumns", "no")) )
         limitsPanel.setUseTwoColumnsIfPossible(true);
      int buttons = 0;
      if ( "yes".equalsIgnoreCase(getParameter("UseSetLimitsButton", "yes")) )
         buttons |= LimitControlPanel.SET_LIMITS;
      if ( ! "no".equalsIgnoreCase(getParameter("UseZoomButtons", "no")) )
         buttons |= LimitControlPanel.ZOOM_IN | LimitControlPanel.ZOOM_OUT;
      if ( ! "no".equalsIgnoreCase(getParameter("UseEqualizeButton", "no")) )
         buttons |= LimitControlPanel.EQUALIZE;
      if ( ! "no".equalsIgnoreCase(getParameter("UseRestoreButton", "no")) )
         buttons |= LimitControlPanel.RESTORE;
      if (buttons != 0)
         limitsPanel.addButtons(buttons);
      limitsPanel.setBackground( getColorParam("PanelBackground", Color.lightGray) );
      if ( ! "yes".equalsIgnoreCase(getParameter("LimitsOnLeft", "no")))
         mainPanel.add(limitsPanel, BorderLayout.EAST);
      else
         mainPanel.add(limitsPanel, BorderLayout.WEST);
      limitsPanel.setErrorReporter(canvas);
   }


Generated by  Doxygen 1.6.0   Back to index