public Dimension getPreferredSize() { Dimension dim = super.getPreferredSize(); return (isLeaf)?dim:new Dimension(800,dim.height); }
public Dimension getPreferredSize() { // change prefered size to disable the swing // "..." bug in tree display Dimension d = new Dimension(super.getPreferredSize()); d.setSize(d.getWidth()+10, d.getHeight()); return d; } }
public Dimension getPreferredSize() { // change prefered size to disable the swing // "..." bug in tree display Dimension d = new Dimension(super.getPreferredSize()); d.setSize(d.getWidth()+10, d.getHeight()); return d; } }
@Override public Dimension getPreferredSize() { int height = row > 0 ? getFontMetrics(getFont()).getHeight() + 4 : 0; return new Dimension(super.getPreferredSize().width, height); }
@Override public Dimension getPreferredSize() { // hides the unnecessary root row // not sure why this method is used rather than tree.setRootVisible(false) // but keep for consistency with other panels int height = row > 0 ? getFontMetrics(getFont()).getHeight() + 4 : 0; return new Dimension(super.getPreferredSize().width, height); } }
@Override public Dimension getPreferredSize() { if (isRightToLeft()) { if(editingComponent != null) { Dimension pSize = editingComponent.getPreferredSize(); pSize.width += offset + 5; Dimension rSize = (renderer != null) ? renderer.getPreferredSize() : null; if(rSize != null) pSize.height = Math.max(pSize.height, rSize.height); if(editingIcon != null) pSize.height = Math.max(pSize.height, editingIcon.getIconHeight()); // trying to enforce a minimum size leads to field being painted over the icon // Make sure width is at least 100. // pSize.width = Math.max(pSize.width, 100); return pSize; } return new Dimension(0, 0); } return super.getPreferredSize(); }
@Override public Dimension getPreferredSize() { if (isRightToLeft()) { if(editingComponent != null) { Dimension pSize = editingComponent.getPreferredSize(); pSize.width += offset + 5; Dimension rSize = (renderer != null) ? renderer.getPreferredSize() : null; if(rSize != null) pSize.height = Math.max(pSize.height, rSize.height); if(editingIcon != null) pSize.height = Math.max(pSize.height, editingIcon.getIconHeight()); // trying to enforce a minimum size leads to field being painted over the icon // Make sure width is at least 100. // pSize.width = Math.max(pSize.width, 100); return pSize; } return new Dimension(0, 0); } return super.getPreferredSize(); }
@Override public Dimension getPreferredSize() { if (isRightToLeft()) { if(editingComponent != null) { Dimension pSize = editingComponent.getPreferredSize(); pSize.width += offset + 5; Dimension rSize = (renderer != null) ? renderer.getPreferredSize() : null; if(rSize != null) pSize.height = Math.max(pSize.height, rSize.height); if(editingIcon != null) pSize.height = Math.max(pSize.height, editingIcon.getIconHeight()); // trying to enforce a minimum size leads to field being painted over the icon // Make sure width is at least 100. // pSize.width = Math.max(pSize.width, 100); return pSize; } return new Dimension(0, 0); } return super.getPreferredSize(); }
@Override public Dimension getPreferredSize() { if (isRightToLeft()) { if(editingComponent != null) { Dimension pSize = editingComponent.getPreferredSize(); pSize.width += offset + 5; Dimension rSize = (renderer != null) ? renderer.getPreferredSize() : null; if(rSize != null) pSize.height = Math.max(pSize.height, rSize.height); if(editingIcon != null) pSize.height = Math.max(pSize.height, editingIcon.getIconHeight()); // trying to enforce a minimum size leads to field being painted over the icon // Make sure width is at least 100. // pSize.width = Math.max(pSize.width, 100); return pSize; } return new Dimension(0, 0); } return super.getPreferredSize(); }
@Override public Dimension getPreferredSize() { if (isRightToLeft()) { if(editingComponent != null) { Dimension pSize = editingComponent.getPreferredSize(); pSize.width += offset + 5; Dimension rSize = (renderer != null) ? renderer.getPreferredSize() : null; if(rSize != null) pSize.height = Math.max(pSize.height, rSize.height); if(editingIcon != null) pSize.height = Math.max(pSize.height, editingIcon.getIconHeight()); // trying to enforce a minimum size leads to field being painted over the icon // Make sure width is at least 100. // pSize.width = Math.max(pSize.width, 100); return pSize; } return new Dimension(0, 0); } return super.getPreferredSize(); }