@Override protected void installComponents(JXTitledPanel titledPanel) { super.installComponents(titledPanel); Border currBorder = titledPanel.getBorder(); if ((currBorder == null) || (currBorder instanceof UIResource)) { titledPanel .setBorder(new BorderUIResource.CompoundBorderUIResource( new EmptyBorder(2, 2, 2, 2), new CompoundBorder( ShadowPopupBorder.getInstance(), new SubstanceBorder()))); } }
protected void installComponents(JXTitledPanel titledPanel) { topPanel.add(caption, new GridBagConstraints(1, 0, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, getCaptionInsets(), 0, 0)); if (titledPanel.getClientProperty(JXTitledPanel.RIGHT_DECORATION) instanceof JComponent) { setRightDecoration((JComponent) titledPanel.getClientProperty(JXTitledPanel.RIGHT_DECORATION)); } if (titledPanel.getClientProperty(JXTitledPanel.LEFT_DECORATION) instanceof JComponent) { setLeftDecoration((JComponent) titledPanel.getClientProperty(JXTitledPanel.LEFT_DECORATION)); } // swingx#500 if (!(titledPanel.getLayout() instanceof BorderLayout)){ titledPanel.setLayout(new BorderLayout()); } titledPanel.add(topPanel, BorderLayout.NORTH); // fix #1063-swingx: must respect custom border if (SwingXUtilities.isUIInstallable(titledPanel.getBorder())) { // use uiresource border // old was: BorderFactory.createRaisedBevelBorder()); titledPanel.setBorder(BorderUIResource.getRaisedBevelBorderUIResource()); } }
protected void installComponents(JXTitledPanel titledPanel) { topPanel.add(caption, new GridBagConstraints(1, 0, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, getCaptionInsets(), 0, 0)); if (titledPanel.getClientProperty(JXTitledPanel.RIGHT_DECORATION) instanceof JComponent) { setRightDecoration((JComponent) titledPanel.getClientProperty(JXTitledPanel.RIGHT_DECORATION)); } if (titledPanel.getClientProperty(JXTitledPanel.LEFT_DECORATION) instanceof JComponent) { setLeftDecoration((JComponent) titledPanel.getClientProperty(JXTitledPanel.LEFT_DECORATION)); } // swingx#500 if (!(titledPanel.getLayout() instanceof BorderLayout)){ titledPanel.setLayout(new BorderLayout()); } titledPanel.add(topPanel, BorderLayout.NORTH); // fix #1063-swingx: must respect custom border if (SwingXUtilities.isUIInstallable(titledPanel.getBorder())) { // use uiresource border // old was: BorderFactory.createRaisedBevelBorder()); titledPanel.setBorder(BorderUIResource.getRaisedBevelBorderUIResource()); } }
protected void installComponents(JXTitledPanel titledPanel) { topPanel.add(caption, new GridBagConstraints(1, 0, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, getCaptionInsets(), 0, 0)); if (titledPanel.getClientProperty(JXTitledPanel.RIGHT_DECORATION) instanceof JComponent) { setRightDecoration((JComponent) titledPanel.getClientProperty(JXTitledPanel.RIGHT_DECORATION)); } if (titledPanel.getClientProperty(JXTitledPanel.LEFT_DECORATION) instanceof JComponent) { setLeftDecoration((JComponent) titledPanel.getClientProperty(JXTitledPanel.LEFT_DECORATION)); } // swingx#500 if (!(titledPanel.getLayout() instanceof BorderLayout)){ titledPanel.setLayout(new BorderLayout()); } titledPanel.add(topPanel, BorderLayout.NORTH); // fix #1063-swingx: must respect custom border if (SwingXUtilities.isUIInstallable(titledPanel.getBorder())) { // use uiresource border // old was: BorderFactory.createRaisedBevelBorder()); titledPanel.setBorder(BorderUIResource.getRaisedBevelBorderUIResource()); } }
protected void installComponents(JXTitledPanel titledPanel) { topPanel.add(caption, new GridBagConstraints(1, 0, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, getCaptionInsets(), 0, 0)); if (titledPanel.getClientProperty(JXTitledPanel.RIGHT_DECORATION) instanceof JComponent) { setRightDecoration((JComponent) titledPanel.getClientProperty(JXTitledPanel.RIGHT_DECORATION)); } if (titledPanel.getClientProperty(JXTitledPanel.LEFT_DECORATION) instanceof JComponent) { setLeftDecoration((JComponent) titledPanel.getClientProperty(JXTitledPanel.LEFT_DECORATION)); } // swingx#500 if (!(titledPanel.getLayout() instanceof BorderLayout)){ titledPanel.setLayout(new BorderLayout()); } titledPanel.add(topPanel, BorderLayout.NORTH); // fix #1063-swingx: must respect custom border if (SwingXUtilities.isUIInstallable(titledPanel.getBorder())) { // use uiresource border // old was: BorderFactory.createRaisedBevelBorder()); titledPanel.setBorder(BorderUIResource.getRaisedBevelBorderUIResource()); } }
protected void installComponents(JXTitledPanel titledPanel) { topPanel.add(caption, new GridBagConstraints(1, 0, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, getCaptionInsets(), 0, 0)); if (titledPanel.getClientProperty(JXTitledPanel.RIGHT_DECORATION) instanceof JComponent) { setRightDecoration((JComponent) titledPanel.getClientProperty(JXTitledPanel.RIGHT_DECORATION)); } if (titledPanel.getClientProperty(JXTitledPanel.LEFT_DECORATION) instanceof JComponent) { setLeftDecoration((JComponent) titledPanel.getClientProperty(JXTitledPanel.LEFT_DECORATION)); } // swingx#500 if (!(titledPanel.getLayout() instanceof BorderLayout)){ titledPanel.setLayout(new BorderLayout()); } titledPanel.add(topPanel, BorderLayout.NORTH); // fix #1063-swingx: must respect custom border if (SwingXUtilities.isUIInstallable(titledPanel.getBorder())) { // use uiresource border // old was: BorderFactory.createRaisedBevelBorder()); titledPanel.setBorder(BorderUIResource.getRaisedBevelBorderUIResource()); } }