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

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

This method is called by setUpMainPanel() to add a panel at the top of the applet. If there is an example menu, then the panel containing that menu is added to the NORTH position of the main panel. Otherwise, the value of the applet parameter named "PanelTitle" is checked. If this value exists, it is placed in a label at the top of the panel. The color of the text on the label is given by the valur of the applet parameter "TitleColor" (default is new Color(200,0,0)).

Definition at line 356 of file GenericGraphApplet.java.

References exampleMenuPanel, getColorParam(), getParameter(), and mainPanel.

Referenced by setUpMainPanel().

      if (exampleMenuPanel != null)
         mainPanel.add(exampleMenuPanel, BorderLayout.NORTH);
      else {
         String title = getParameter("PanelTitle");
         if (title != null) {
             Label titleLabel = new Label(title, Label.CENTER);
             titleLabel.setForeground( getColorParam("TitleForeground", new Color(200,0,0)) );
             titleLabel.setBackground( getColorParam("TitleBackground", Color.lightGray) );
             titleLabel.setFont( new Font("Serif", Font.PLAIN, 14) );
             mainPanel.add(titleLabel, BorderLayout.NORTH);

Generated by  Doxygen 1.6.0   Back to index