xmlsimpletableselpanel.java
来自「jawe的最新版本,基于Java的图形化工作流编辑器。图形化工作流编辑器 。使用」· Java 代码 · 共 58 行
JAVA
58 行
package org.enhydra.jawe.base.panel.panels;import java.util.List;import javax.swing.ListSelectionModel;import javax.swing.event.ListSelectionEvent;import javax.swing.event.ListSelectionListener;import org.enhydra.jawe.JaWEManager;import org.enhydra.jawe.base.panel.PanelContainer;import org.enhydra.shark.xpdl.XMLCollection;import org.enhydra.shark.xpdl.XMLElement;/** * Creates a table panel. * * @author Sasa Bojanic * @author Zoran Milakovic * @author Miroslav Popov */public class XMLSimpleTableSelPanel extends XMLSimpleTablePanel { public XMLSimpleTableSelPanel(PanelContainer pc, XMLCollection myOwner, List columnsToShow, List elementsToShow, String title, boolean hasBorder, boolean hasEmptyBorder, boolean automaticWidth) { super(pc, myOwner, columnsToShow, elementsToShow, title, hasBorder, hasEmptyBorder, automaticWidth); } protected void setupTable(boolean automaticWidth) { super.setupTable(automaticWidth); // selection listener for sending selection event ListSelectionModel lsm = allItems.getSelectionModel(); lsm.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { // Ignore extra messages. if (e.getValueIsAdjusting()) return; ListSelectionModel ls = (ListSelectionModel) e.getSource(); if (ls.isSelectionEmpty()) { } else { try { XMLElement el = getSelectedElement(); if (el != null) { JaWEManager.getInstance().getJaWEController().getSelectionManager().setSelection(el, true); } } catch (Exception ex) { } } } }); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?