/// <summary> /// Responds to list selections. </summary> /// <param name="e"> the ListSelectionEvent that happened. </param> public virtual void valueChanged(ListSelectionEvent e) { int index = __fileJList.getSelectedIndex(); if (index == 0 || index == 1) { __fileJList.removeSelectionInterval(index, index); return; // Don't want the following to somehow get confused... } // If anything is selected in the list, enable the View/Edit button... if ((__fileJList.getSelectedIndices() != null) && (__fileJList.getSelectedIndices().length > 0)) { __viewEditJButton.setEnabled(true); } else { __viewEditJButton.setEnabled(false); } }
public virtual void valueChanged(ListSelectionEvent arg0) { if (arg0.Source == logTable.SelectionModel) { System.Text.StringBuilder buffer = new System.Text.StringBuilder(); if (logTable.SelectedRow > - 1) { LogMessageEvent event_Renamed = dataModel.getRow(logTable.SelectedRow); buffer.Append("Date-Time: " + event_Renamed.DatetimeFormatted + "\nChannel: " + event_Renamed.ChannelId + "\nMessage-Type: " + event_Renamed.TypeFormatted + "\n\nMessage:\n========\n"); System.Object message = event_Renamed.Message; if (message is System.Exception) { System.Exception ex = (System.Exception) message; StackTraceElement[] str = ex.StackTrace; //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.getMessage' may return a different value. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1043"' buffer.Append(ex.GetType().FullName + ": " + ex.Message); for (int idx = 0; idx < str.length; idx++) { StackTraceElement strelem = str[idx]; buffer.Append("\n" + strelem); } } else if (message is Function) { buffer.Append("(" + ((Function) message).Name + ")"); } else { //UPGRADE_TODO: The equivalent in .NET for method 'java.Object.toString' may return a different value. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1043"' buffer.Append(message.ToString()); } } detailView.setText(buffer.ToString()); } }
public virtual void ValueChanged(ListSelectionEvent e) { this._enclosing.UpdateSelectedPathsFromSelectedRows(); }
public virtual void valueChanged(ListSelectionEvent event_Renamed) { if (event_Renamed.Source == moduleList.SelectionModel) { initTemplateList(); } else if (event_Renamed.Source == templateList.SelectionModel) { if (templateList.SelectedIndex > - 1) { nextButton.setEnabled(true); Module module = engine.WorkingMemory.findModule(System.String.valueOf(moduleList.SelectedValue)); Template tmp = module.getTemplate(System.String.valueOf(templateList.SelectedValue)); dumpAreaTemplate.setText("(deftemplate " + tmp.Name + "\n"); Slot[] slots = tmp.AllSlots; for (int idx = 0; idx < slots.Length; idx++) { Slot slot = slots[idx]; dumpAreaTemplate.append(" ("); if (slot is MultiSlot) { dumpAreaTemplate.append("multislot"); } else { dumpAreaTemplate.append("slot"); } dumpAreaTemplate.append(" " + slot.Name + ")\n"); } dumpAreaTemplate.append(")"); } else { nextButton.setEnabled(false); } } }
/// <summary> /// Invoked when the selection model of the <code>TableColumnModel</code> /// is changed. /// </summary> public void columnSelectionChanged(ListSelectionEvent @e) { }
public virtual void valueChanged(ListSelectionEvent arg0) { if (arg0.Source == factsTable.SelectionModel) { System.Text.StringBuilder buffer = new System.Text.StringBuilder(); if (factsTable.SelectedColumnCount == 1 && factsTable.SelectedRow > - 1) { Fact fact = dataModel.getRow(factsTable.SelectedRow); if (fact != null) { buffer.Append("f-" + fact.FactId + "(" + fact.Deftemplate.Name); Slot[] slots = fact.Deftemplate.AllSlots; for (int idx = 0; idx < slots.Length; idx++) { Slot slot = slots[idx]; buffer.Append("\n (" + slot.Name + " "); if (slot.ValueType == Constants.ARRAY_TYPE) { MultiSlot ms = (MultiSlot) slot; for (int i = 0; i < ((System.Object[]) ms.Value).Length; ++i) { if (i > 0) buffer.Append(" "); //UPGRADE_TODO: The equivalent in .NET for method 'java.Object.toString' may return a different value. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1043"' buffer.Append(((System.Object[]) ms.Value)[i].ToString()); } } else { //UPGRADE_TODO: The equivalent in .NET for method 'java.Object.toString' may return a different value. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1043"' System.String value_Renamed = fact.getSlotValue(slot.Id).ToString(); if (!value_Renamed.Equals("")) buffer.Append(value_Renamed); } buffer.Append(")"); } buffer.Append("\n)"); } } dumpArea.setText(buffer.ToString()); } }
public override void valueChanged(ListSelectionEvent e) { change(); }
public override void valueChanged(ListSelectionEvent e) { outerInstance.btnRemove.Enabled = !((ListSelectionModel)e.Source).SelectionEmpty; }
public virtual void valueChanged(ListSelectionEvent arg0) { if (arg0.Source == functionsTable.SelectionModel) { System.Text.StringBuilder buffer = new System.Text.StringBuilder(); if (functionsTable.SelectedColumnCount == 1 && functionsTable.SelectedRow > - 1) { Function function = dataModel.getRow(functionsTable.SelectedRow); if (function != null) { buffer.Append(function.toPPString(null, 0)); buffer.Append("\n"); } } dumpAreaFunction.setText(buffer.ToString()); } }
/// <summary> /// Invoked when the row selection changes -- repaints to show the new /// selection. /// </summary> public void valueChanged(ListSelectionEvent @e) { }