/** * Return an ordered list of TrackPanels. This method is provided primarily for storing sessions, where * TrackPanels need to be stored in proper order * * @return */ public java.util.List<TrackPanel> getTrackPanels() { ArrayList<TrackPanel> panels = new ArrayList<TrackPanel>(); for (Component c : centerSplitPane.getComponents()) { if (c instanceof TrackPanelScrollPane) { panels.add(((TrackPanelScrollPane) c).getTrackPanel()); } } return panels; }
/** * Return the image height required to paint this component with current options. This is used to size bitmap * images for offscreen drawing. * * @return */ public int getOffscreenImageHeight() { int height = centerSplitPane.getBounds().y; for (Component c : centerSplitPane.getComponents()) { if (c instanceof TrackPanelScrollPane) { TrackPanelScrollPane tsp = (TrackPanelScrollPane) c; //Skip if panel has no tracks if (tsp.getTrackPanel().getTracks().size() == 0) { continue; } int panelHeight = getOffscreenImagePanelHeight(tsp); Rectangle tspRect = new Rectangle(tsp.getBounds()); tspRect.height = panelHeight; height += tspRect.height; } else { height += c.getHeight(); } } // TODO Not sure why this is neccessary height += 35; return height; }
for (Component c : centerSplitPane.getComponents()) { if (c instanceof TrackPanelScrollPane) { TrackPanelScrollPane tsp = (TrackPanelScrollPane) c;
Component[] components = centerSplitPane.getComponents(); Arrays.sort(components, new Comparator<Component>() { public int compare(Component component, Component component1) {
layoutManager = new JideSplitPaneLayout(this, JideSplitPaneLayout.Y_AXIS); Component[] components = getComponents(); LayoutManager oldManager = getLayout(); Map<Component,Object> constraintMap = null;
int y = 0; int i = 0; for (Component c : centerSplitPane.getComponents()) { if (c instanceof TrackPanelScrollPane) { final TrackPanel trackPanel = ((TrackPanelScrollPane) c).getTrackPanel();