MCPcopy Create free account
hub / github.com/rambaut/figtree / FigTreeFrame

Class FigTreeFrame

src/figtree/application/FigTreeFrame.java:83–1873  ·  view source on GitHub ↗

Primary window for FigTree. The window contains a toolbar, a control panel and a panel displaying the tree. It responds to menu commands and hot keys specific to the focused window. @author Andrew Rambaut @version $Id: FigTreeApplication.java 232 2014-03-02 15:47:10Z rambaut $ $HeadURL: https://fig

Source from the content-addressed store, hash-verified

81 * $LastChangedRevision: 232 $
82 */
83public class FigTreeFrame extends DocumentFrame implements FigTreeFileMenuHandler, TreeMenuHandler {
84 private final ExtendedTreeViewer treeViewer;
85 private final ControlPalette controlPalette;
86 private final FigTreePanel figTreePanel;
87
88 private StatusBar statusBar;
89
90 private SearchPanel filterPanel;
91 private JPopupMenu filterPopup;
92
93 public FigTreeFrame(String title) {
94 super();
95
96 setTitle(title);
97
98 setImportAction(importAction);
99 // setImportAction(importCharactersAction);
100 setExportAction(exportTreesAction);
101
102 treeViewer = new ExtendedTreeViewer(this);
103 controlPalette = new BasicControlPalette(200, BasicControlPalette.DisplayMode.ONLY_ONE_OPEN);
104
105 figTreePanel = new FigTreePanel(this, treeViewer, controlPalette);
106
107 this.addWindowFocusListener(new WindowAdapter() {
108 public void windowGainedFocus(WindowEvent e) {
109 treeViewer.requestFocusInWindow();
110 }
111 });
112 }
113
114 public void initializeComponents() {
115
116 setSize(new java.awt.Dimension(1024, 768));
117
118 Toolbar toolBar = new Toolbar();
119 toolBar.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.darkGray));
120
121 toolBar.setRollover(true);
122 toolBar.setFloatable(false);
123
124 Icon rerootToolIcon = IconUtils.getIcon(this.getClass(), "images/rerootTool.png");
125 Icon rotateToolIcon = IconUtils.getIcon(this.getClass(), "images/rotateTool.png");
126 Icon cartoonNodeToolIcon = IconUtils.getIcon(this.getClass(), "images/cartoonNodeTool.png");
127 Icon collapseNodeToolIcon = IconUtils.getIcon(this.getClass(), "images/collapseNodeTool.png");
128 Icon hilightToolIcon = IconUtils.getIcon(this.getClass(), "images/hilightTool.png");
129 Icon annotationToolIcon = IconUtils.getIcon(this.getClass(), "images/annotationTool.png");
130 Icon findToolIcon = IconUtils.getIcon(this.getClass(), "images/findTool.png");
131 Icon infoToolIcon = IconUtils.getIcon(this.getClass(), "images/infoTool.png");
132 Icon statisticsToolIcon = IconUtils.getIcon(this.getClass(), "images/statisticsTool.png");
133 Icon settingsToolIcon = IconUtils.getIcon(this.getClass(), "images/projectTool.png");
134 Icon colourToolIcon = IconUtils.getIcon(this.getClass(), "images/coloursTool.png");
135
136 Icon nextIcon = IconUtils.getIcon(this.getClass(), "images/next.png");
137 Icon prevIcon = IconUtils.getIcon(this.getClass(), "images/prev.png");
138
139 final ToolbarAction cartoonToolbarAction = new ToolbarAction("Cartoon", CARTOON_NODE, cartoonNodeToolIcon) {
140 public void actionPerformed(ActionEvent e){

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…