下面列出了javax.swing.LookAndFeel#uninstallBorder ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
protected void installClientDecorations() {
boolean isJBRSupported = canUseJBRCustomDecorations && JBRCustomDecorations.isSupported();
// install border
if( rootPane.getWindowDecorationStyle() != JRootPane.NONE && !isJBRSupported )
LookAndFeel.installBorder( rootPane, "RootPane.border" );
else
LookAndFeel.uninstallBorder( rootPane );
// install title pane
setTitlePane( createTitlePane() );
// install layout
oldLayout = rootPane.getLayout();
rootPane.setLayout( createRootLayout() );
// install window resizer
if( !isJBRSupported )
windowResizer = createWindowResizer();
}
protected void uninstallClientDecorations() {
LookAndFeel.uninstallBorder( rootPane );
setTitlePane( null );
if( windowResizer != null ) {
windowResizer.uninstall();
windowResizer = null;
}
if( oldLayout != null ) {
rootPane.setLayout( oldLayout );
oldLayout = null;
}
if( rootPane.getWindowDecorationStyle() == JRootPane.NONE ) {
rootPane.revalidate();
rootPane.repaint();
}
}
/**
* Installs the appropriate <code>Border</code> onto the
* <code>JRootPane</code>.
*
* @param root the root
*/
void installBorder(JRootPane root)
{
int style = root.getWindowDecorationStyle();
if (style == JRootPane.NONE)
{
LookAndFeel.uninstallBorder(root);
}
else
{
Border b = root.getBorder();
if (b == null || b instanceof UIResource)
{
root.setBorder(null);
root.setBorder(UIManager.getBorder(borderKeys[style]));
}
}
}
@Override
protected void uninstallDefaults() {
super.uninstallDefaults();
LookAndFeel.uninstallBorder( tree );
selectionBackground = null;
selectionForeground = null;
selectionInactiveBackground = null;
selectionInactiveForeground = null;
selectionBorderColor = null;
}
/**
* Installs the appropriate <code>Border</code> onto the <code>
* JRootPane</code>.
*
* @param root the root pane.
*/
public void installBorder(JRootPane root) {
int style = root.getWindowDecorationStyle();
if (style == JRootPane.NONE) {
LookAndFeel.uninstallBorder(root);
} else {
root.setBorder(new SeaGlassBorder(this, new Insets(0, 1, 1, 1)));
}
}
protected void uninstallDefaults() {
LookAndFeel.uninstallBorder(lizziePane);
}
protected void uninstallBorder(JPanel p) {
LookAndFeel.uninstallBorder(p);
}
public void uninstallUI(JComponent c) {
LookAndFeel.uninstallBorder(c);
}
protected void uninstallDefaults(JComponent c){
LookAndFeel.uninstallBorder(c);
}
/**
* <p>去除窗格边框</p>
*
* <p>remove JRootPane border.</p>
*
* @param root
*/
protected void uninstallBorder(JRootPane root)
{
LookAndFeel.uninstallBorder(root);
root.setBorder(null);
}
/**
* Removes any border that may have been installed.
*
* @param root the root
*/
private void uninstallBorder(JRootPane root)
{
LookAndFeel.uninstallBorder(root);
}
/**
* Removes any border that may have been installed.
*
* @param root the root pane.
*/
private void uninstallBorder(JRootPane root) {
LookAndFeel.uninstallBorder(root);
}