public ExtCompletionPane getExtPane() { if (pane == null){ pane = new ScrollCompletionPane(extEditorUI); } return pane; }
public void run() { if (isShowing()) { // #18810 Rectangle bounds = getPreferredBounds(); setBounds(bounds); revalidate(); } } });
public void run() { if (isShowing()) { // #18810 // extEditorUI.getPopupManager().reset(extEditorUI.getComponent()); revalidate(); } } }
Dimension smallSize = getPreferredSize(); setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_ALWAYS); setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_ALWAYS); scrollBarSize = getPreferredSize(); scrollBarSize.width -= smallSize.width; scrollBarSize.height -= smallSize.height; setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_AS_NEEDED); setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_AS_NEEDED); installTitleComponent(); if (completionView instanceof JComponent) { view = (JComponent)completionView; setViewportView(view); getViewport().setMinimumSize(new Dimension(4,4)); propertyChange(new PropertyChangeEvent(extEditorUI, ExtEditorUI.COMPONENT_PROPERTY, null, component)); putClientProperty ("HelpID", ScrollCompletionPane.class.getName ()); // !!! NOI18N
public void setSize(int width, int height){ int maxWidth = width; int maxHeight = height; minSize.width = minSizeDefault.width; minSize.height = minSizeDefault.height; setMinimumSize(minSize); Dimension ps = getPreferredSize(); /* Add size of the vertical scrollbar by default. This could be improved * to be done only if the height exceeds the bounds. */ ps.width += scrollBarSize.width; ps.width = Math.max(Math.max(ps.width, minSize.width), getTitleComponentPreferredSize().width); maxWidth = Math.min(maxWidth, maxSize.width); maxHeight = Math.min(maxHeight, maxSize.height); boolean displayHorizontalScrollbar = (ps.width-scrollBarSize.width)>maxWidth; if (ps.width > maxWidth) { ps.width = maxWidth; if (displayHorizontalScrollbar){ ps.height += scrollBarSize.height; // will show horizontal scrollbar minSize.height += scrollBarSize.height; setMinimumSize(minSize); } } ps.height = Math.min(Math.max(ps.height, minSize.height), maxHeight); super.setSize(ps.width, ps.height); }
Dimension ps = getPreferredSize(); ps.width = Math.max(Math.max(ps.width, minSize.width), getTitleComponentPreferredSize().width);
protected void installTitleComponent() { topLabel = new JLabel(); topLabel.setForeground(Color.blue); topLabel.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 2)); setColumnHeaderView(topLabel); }
Dimension smallSize = getPreferredSize(); setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_ALWAYS); setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_ALWAYS); scrollBarSize = getPreferredSize(); scrollBarSize.width -= smallSize.width; scrollBarSize.height -= smallSize.height; setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_AS_NEEDED); setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_AS_NEEDED); installTitleComponent(); if (completionView instanceof JComponent) { view = (JComponent)completionView; setViewportView(view); getViewport().setMinimumSize(new Dimension(4,4)); propertyChange(new PropertyChangeEvent(extEditorUI, ExtEditorUI.COMPONENT_PROPERTY, null, component)); putClientProperty ("HelpID", ScrollCompletionPane.class.getName ()); // !!! NOI18N
public void setSize(int width, int height){ int maxWidth = width; int maxHeight = height; minSize.width = minSizeDefault.width; minSize.height = minSizeDefault.height; setMinimumSize(minSize); Dimension ps = getPreferredSize(); /* Add size of the vertical scrollbar by default. This could be improved * to be done only if the height exceeds the bounds. */ ps.width += scrollBarSize.width; ps.width = Math.max(Math.max(ps.width, minSize.width), getTitleComponentPreferredSize().width); maxWidth = Math.min(maxWidth, maxSize.width); maxHeight = Math.min(maxHeight, maxSize.height); boolean displayHorizontalScrollbar = (ps.width-scrollBarSize.width)>maxWidth; if (ps.width > maxWidth) { ps.width = maxWidth; if (displayHorizontalScrollbar){ ps.height += scrollBarSize.height; // will show horizontal scrollbar minSize.height += scrollBarSize.height; setMinimumSize(minSize); } } ps.height = Math.min(Math.max(ps.height, minSize.height), maxHeight); super.setSize(ps.width, ps.height); }
public void run() { if (isShowing()) { // #18810 // extEditorUI.getPopupManager().reset(extEditorUI.getComponent()); revalidate(); } } }
protected void installTitleComponent() { topLabel = new JLabel(); topLabel.setForeground(Color.blue); topLabel.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 2)); setColumnHeaderView(topLabel); }
Dimension smallSize = getPreferredSize(); setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_ALWAYS); setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_ALWAYS); scrollBarSize = getPreferredSize(); scrollBarSize.width -= smallSize.width; scrollBarSize.height -= smallSize.height; setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_AS_NEEDED); setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_AS_NEEDED); installTitleComponent(); if (completionView instanceof JComponent) { view = (JComponent) completionView; setViewportView(view); getViewport().setMinimumSize(new Dimension(4, 4)); propertyChange(new PropertyChangeEvent(extEditorUI, ExtEditorUI.COMPONENT_PROPERTY, null, component)); putClientProperty("HelpID", ScrollCompletionPane.class.getName()); // !!!
public ExtCompletionPane getExtPane() { if (pane == null){ pane = new ScrollCompletionPane(extEditorUI); } return pane; }
protected void installTitleComponent() { topLabel = new JLabel(); topLabel.setForeground(Color.blue); topLabel.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 2)); setColumnHeaderView(topLabel); }
public CompletionPane getPane() { if (pane == null) { pane = new ScrollCompletionPane(extEditorUI); } return pane; }