File Source: MenuTab.java

         /* 
    P/P   *  Method: org.apache.roller.weblogger.ui.core.util.menu.MenuTab__static_init
          */
     1  /*
     2   * Licensed to the Apache Software Foundation (ASF) under one or more
     3   *  contributor license agreements.  The ASF licenses this file to You
     4   * under the Apache License, Version 2.0 (the "License"); you may not
     5   * use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *     http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.  For additional information regarding
    15   * copyright in this work, please see the NOTICE file in the top level
    16   * directory of this distribution.
    17   */
    18  
    19  package org.apache.roller.weblogger.ui.core.util.menu;
    20  
    21  import java.util.ArrayList;
    22  import java.util.List;
    23  
    24  
    25  /**
    26   * Tab in a Menu.
    27   */
         /* 
    P/P   *  Method: void org.apache.roller.weblogger.ui.core.util.menu.MenuTab()
          * 
          *  Postconditions:
          *    this.action == null
          *    this.key == null
          *    this.items == &new ArrayList(MenuTab#1)
          *    this.selected == 0
          *    new ArrayList(MenuTab#1) num objects == 1
          */
    28  public class MenuTab {
    29      
    30      private String key = null;
    31      private String action = null;
    32      private boolean selected = false;
    33      private List items = new ArrayList();
    34      
    35      
    36      public void addItem(MenuTabItem item) {
                 /* 
    P/P           *  Method: void addItem(MenuTabItem)
                  * 
                  *  Preconditions:
                  *    this.items != null
                  */
    37          this.items.add(item);
    38      }
    39      
    40      
    41      public String getKey() {
                 /* 
    P/P           *  Method: String getKey()
                  * 
                  *  Preconditions:
                  *    init'ed(this.key)
                  * 
                  *  Postconditions:
                  *    return_value == this.key
                  *    init'ed(return_value)
                  */
    42          return key;
    43      }
    44  
    45      public void setKey(String key) {
                 /* 
    P/P           *  Method: void setKey(String)
                  * 
                  *  Postconditions:
                  *    this.key == key
                  *    init'ed(this.key)
                  */
    46          this.key = key;
    47      }
    48  
    49      public String getAction() {
                 /* 
    P/P           *  Method: String getAction()
                  * 
                  *  Preconditions:
                  *    init'ed(this.action)
                  * 
                  *  Postconditions:
                  *    return_value == this.action
                  *    init'ed(return_value)
                  */
    50          return action;
    51      }
    52  
    53      public void setAction(String url) {
                 /* 
    P/P           *  Method: void setAction(String)
                  * 
                  *  Postconditions:
                  *    this.action == url
                  *    init'ed(this.action)
                  */
    54          this.action = url;
    55      }
    56  
    57      public boolean isSelected() {
                 /* 
    P/P           *  Method: bool isSelected()
                  * 
                  *  Preconditions:
                  *    init'ed(this.selected)
                  * 
                  *  Postconditions:
                  *    return_value == this.selected
                  *    init'ed(return_value)
                  */
    58          return selected;
    59      }
    60  
    61      public void setSelected(boolean selected) {
                 /* 
    P/P           *  Method: void setSelected(bool)
                  * 
                  *  Postconditions:
                  *    this.selected == selected
                  *    init'ed(this.selected)
                  */
    62          this.selected = selected;
    63      }
    64      
    65      public List getItems() {
                 /* 
    P/P           *  Method: List getItems()
                  * 
                  *  Preconditions:
                  *    init'ed(this.items)
                  * 
                  *  Postconditions:
                  *    return_value == this.items
                  *    init'ed(return_value)
                  */
    66          return items;
    67      }
    68  
    69      public void setItems(List items) {
                 /* 
    P/P           *  Method: void setItems(List)
                  * 
                  *  Postconditions:
                  *    this.items == items
                  *    init'ed(this.items)
                  */
    70          this.items = items;
    71      }
    72      
    73  }








SofCheck Inspector Build Version : 2.18479
MenuTab.java 2009-Jan-02 14:25:18
MenuTab.class 2009-Sep-04 03:12:44