/// <summary> /// Creates a JScrollWorksheet for the current data and returns it. </summary> /// <returns> a JScrollWorksheet containing the data Vector passed in to the /// constructor. </returns> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: protected RTi.Util.GUI.JScrollWorksheet buildJScrollWorksheet() throws Exception protected internal override JScrollWorksheet buildJScrollWorksheet() { StateMod_Diversion_DelayTableAssignment_Data_TableModel tableModel = new StateMod_Diversion_DelayTableAssignment_Data_TableModel(_data, _editable); StateMod_Diversion_DelayTableAssignment_Data_CellRenderer cellRenderer = new StateMod_Diversion_DelayTableAssignment_Data_CellRenderer(tableModel); // Note (JTS - 2005-03-31) // while it would seem the right thing to do would be to here assign // the table model to __tableModel, JTS found that in practice for // some reason once the constructor was returned to (in order to finish // building the GUI with checkbox) that the table model was then // null! JTS didn't understand why it was happening but didn't // want to spend too long investigating. // _props is defined in the super class return(new JScrollWorksheet(cellRenderer, tableModel, _props)); }
/// <summary> /// Constructor. </summary> /// <param name="data"> the data to display in the worksheet. Can be null or empty. </param> /// <param name="titleString"> the String to display as the GUI title. </param> /// <param name="editable"> whether the data in the JFrame can be edited or not. If true /// the data can be edited, if false they can not. </param> /// <exception cref="Exception"> if there is an error building the worksheet. </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public StateMod_Diversion_DelayTableAssignment_Data_JFrame(java.util.List data, String titleString, boolean editable) throws Exception public StateMod_Diversion_DelayTableAssignment_Data_JFrame(System.Collections.IList data, string titleString, bool editable) : base(data, titleString, editable) { JPanel panel = new JPanel(); panel.setLayout(new GridBagLayout()); JLabel label = new JLabel("Show totals: "); JGUIUtil.addComponent(panel, label, 0, 0, 1, 1, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST); __checkBox = new JCheckBox((string)null, true); __checkBox.addActionListener(this); JGUIUtil.addComponent(panel, __checkBox, 1, 0, 1, 1, 1, 1, GridBagConstraints.NONE, GridBagConstraints.WEST); getContentPane().add("North", panel); pack(); setSize(410, getHeight()); __tableModel = (StateMod_Diversion_DelayTableAssignment_Data_TableModel)_worksheet.getTableModel(); __tableModel.setJWorksheet(_worksheet); }
/// <summary> /// Constructor. </summary> /// <param name="tableModel"> the table model for which to render cells </param> public StateMod_Diversion_DelayTableAssignment_Data_CellRenderer(StateMod_Diversion_DelayTableAssignment_Data_TableModel tableModel) { __tableModel = tableModel; }