/** * @return the container */ public JPanel getContainer() { return (JPanel) ((JViewport) ((JScrollPane) jf.getContentPane().getComponent(0)).getComponent(0)).getComponent(0); } }
/** * @return the container */ public JPanel getContainer() { return (JPanel) ((JViewport) ((JScrollPane) jf.getContentPane().getComponent(0)).getComponent(0)).getComponent(0); } }
private void setFilePaneBackground(final Container container, final Color bg) { final Component[] children = container.getComponents(); for (final Component component : children) { if (component instanceof JScrollPane) { // the "file pane" (the component containing the list of files) // is placed inside a JScrollPane final JScrollPane scroll = (JScrollPane) component; setContainerBackground(scroll.getComponent(0), bg); } else if (component instanceof Container) { setFilePaneBackground((Container) component, bg); } } }
private void insertMessageLabel(JScrollPane parent) { if (parent != null) { this.messagePanel = new JPanel(); this.messagePanel.add(new JLabel(TangoIcons.status_dialog_information(TangoIcons.Res.R16))); this.messageLabel = new JLabel(resampleMessage); this.messageLabel.setForeground(Color.BLUE); this.messagePanel.add(messageLabel); this.messagePanel.setVisible(false); JViewport viewport = (JViewport) parent.getComponent(0); JPanel initial = (JPanel) viewport.getComponent(0); Dimension preferredSize = initial.getPreferredSize(); JPanel wrapper = new JPanel(new BorderLayout()); wrapper.add(initial, BorderLayout.NORTH); wrapper.add(this.messagePanel, BorderLayout.SOUTH); this.messagePanel.setVisible(false); wrapper.setPreferredSize(new Dimension(preferredSize.width, preferredSize.height + 30)); viewport.remove(initial); viewport.add(wrapper); } }
/** * returns the table of the current tab, can be NULL * * @return the currently selected table */ protected ResultSetTable getCurrentTable() { ResultSetTable table; JScrollPane pane; JViewport port; int index; table = null; index = m_TabbedPane.getSelectedIndex(); if (index > -1) { pane = (JScrollPane) m_TabbedPane.getComponentAt(index); port = (JViewport) pane.getComponent(0); table = (ResultSetTable) port.getComponent(0); } return table; }
/** * returns the table of the current tab, can be NULL * * @return the currently selected table */ protected ResultSetTable getCurrentTable() { ResultSetTable table; JScrollPane pane; JViewport port; int index; table = null; index = m_TabbedPane.getSelectedIndex(); if (index > -1) { pane = (JScrollPane) m_TabbedPane.getComponentAt(index); port = (JViewport) pane.getComponent(0); table = (ResultSetTable) port.getComponent(0); } return table; }
public final ArrayList getAvailableAttributes(Markable clickedMarkable) { int index = 0; MMAX2AttributePanel panel = null; index = ((Integer)this.levelToIndex.get(clickedMarkable.getMarkableLevelName())).intValue(); JScrollPane pane =(JScrollPane) tabbedPane.getComponentAt(index); JViewport port = (JViewport)pane.getComponent(0); panel = (MMAX2AttributePanel)port.getView(); return panel.getAllCurrentAttributes(); } /** This method is called when a Markable has been selected on the display. */
private void insertMessageLabel() { Container parent = getDefaultIOParametersPanel().getParent(); JScrollPane scrollPane = (JScrollPane) parent.getComponent(1); JViewport viewport = (JViewport) scrollPane.getComponent(0); JPanel initial = (JPanel) viewport.getComponent(0); Dimension preferredSize = initial.getPreferredSize(); JPanel wrapper = new JPanel(new BorderLayout()); wrapper.add(initial, BorderLayout.NORTH); wrapper.add(messagePanel, BorderLayout.SOUTH); messagePanel.setVisible(false); wrapper.setPreferredSize(preferredSize); viewport.remove(initial); viewport.add(wrapper); final Dimension windowSize = this.getJDialog().getPreferredSize(); this.getJDialog().setMinimumSize(new Dimension(windowSize.width, windowSize.height + 30)); }
public final void disableAll() { // New: use tab count for (int z=0;z<tabbedPane.getTabCount();z++) { JScrollPane pane = ((JScrollPane)tabbedPane.getComponentAt(z)); JViewport port = (JViewport)pane.getComponent(0); ((MMAX2AttributePanel)port.getView()).setEnabled(false); ((MMAX2AttributePanel)port.getView()).rebuild(); tabbedPane.setEnabledAt(z,true); } applyButton.setEnabled(false); undoButton.setEnabled(false); }
JViewport port = (JViewport)pane.getComponent(0); MMAX2AttributePanel tempPanel = (MMAX2AttributePanel) port.getView(); tempPanel.setOneClickAnnotationAttributeName(attribute); JViewport port = (JViewport)pane.getComponent(0); MMAX2AttributePanel selectedPanel = (MMAX2AttributePanel)port.getView(); tabbedPane.setSelectedIndex(index); JScrollPane pane = (JScrollPane) tabbedPane.getSelectedComponent(); JViewport port = (JViewport)pane.getComponent(0); MMAX2AttributePanel selectedPanel = (MMAX2AttributePanel)port.getView();
JViewport port = (JViewport)pane.getComponent(0); JViewport port = (JViewport)pane.getComponent(0); panel = (MMAX2AttributePanel) port.getView();
JEditorPane editorPane = (JEditorPane) ((Container)scrollPane.getComponent(0)).getComponent(0); editorPane.setBackground(ColorController.FUNDO_BOTOES_EXPANSIVEIS); editorPane.setForeground(ColorController.AMARELO);