001package jmri.jmrit.beantable.beanedit; 002 003import javax.swing.JComponent; 004 005/** 006 * Hold the information for each bean panel in a structured manner. 007 */ 008public class BeanEditItem { 009 010 JComponent component; 011 String description; 012 String help; 013 014 /** 015 * Create the item structure to be added. If the component and description 016 * are null, then the help text will be displayed across the width of the 017 * panel. 018 * 019 * @param component Optional Contains the item to be edited 020 * @param description Optional Contains the text for the label that will be 021 * to the left of the component 022 * @param help Optional Contains the help or hint text, that will be 023 * displayed to the right of the component 024 */ 025 public BeanEditItem(JComponent component, String description, String help) { 026 this.component = component; 027 this.description = description; 028 this.help = help; 029 } 030 031 public String getDescription() { 032 return description; 033 } 034 035 public String getHelp() { 036 return help; 037 } 038 039 public JComponent getComponent() { 040 return component; 041 } 042}