}
} );
}
} ) );
add ( new WebSeparator ( false, true ) );
final WebCheckBox showWindowButtons = new WebCheckBox ( "Show window buttons" )
{
{
setSelected ( ExampleFrame.this.isShowWindowButtons () );
addItemListener ( new ItemListener ()
{
@Override
public void itemStateChanged ( ItemEvent e )
{
ExampleFrame.this.setShowWindowButtons ( isSelected () );
ExampleFrame.this.pack ();
}
} );
}
};
add ( new GroupPanel ( 10, showWindowButtons, new WebButtonGroup ( new WebToggleButton ( WebRootPaneUI.minimizeIcon )
{
{
setSelected ( ExampleFrame.this.isShowMinimizeButton () );
addItemListener ( new ItemListener ()
{
@Override
public void itemStateChanged ( ItemEvent e )
{
ExampleFrame.this.setShowMinimizeButton ( isSelected () );
}
} );
}
}, new WebToggleButton ( WebRootPaneUI.maximizeIcon )
{
{
setSelected ( ExampleFrame.this.isShowMaximizeButton () );
addItemListener ( new ItemListener ()
{
@Override
public void itemStateChanged ( ItemEvent e )
{
ExampleFrame.this.setShowMaximizeButton ( isSelected () );
}
} );
}
}, new WebToggleButton ( WebRootPaneUI.closeIcon )
{
{
setSelected ( ExampleFrame.this.isShowCloseButton () );
addItemListener ( new ItemListener ()
{
@Override
public void itemStateChanged ( ItemEvent e )
{
ExampleFrame.this.setShowCloseButton ( isSelected () );
}
} );
}
}
)
{
{
setButtonsMargin ( 2, 4, 2, 4 );
setButtonsDrawFocus ( false );
setEnabled ( showWindowButtons.isSelected () );
showWindowButtons.addItemListener ( new ItemListener ()
{
@Override
public void itemStateChanged ( ItemEvent e )
{
setEnabled ( showWindowButtons.isSelected () );
}
} );
}
} ) );
add ( new WebCheckBox ( "Attach window buttons to sides" )
{
{
setSelected ( ExampleFrame.this.isAttachButtons () );
addItemListener ( new ItemListener ()
{
@Override
public void itemStateChanged ( ItemEvent e )
{
ExampleFrame.this.setAttachButtons ( isSelected () );
ExampleFrame.this.pack ();
}
} );
}
} );
add ( new WebCheckBox ( "Group window buttons" )
{
{
setSelected ( ExampleFrame.this.isGroupButtons () );
addItemListener ( new ItemListener ()
{
@Override
public void itemStateChanged ( ItemEvent e )
{
ExampleFrame.this.setGroupButtons ( isSelected () );
ExampleFrame.this.pack ();
}
} );
}
} );
add ( new WebSeparator ( false, true ) );
final WebCheckBox showMenuBar = new WebCheckBox ( "Show menu bar" )
{
{
setSelected ( ExampleFrame.this.isShowMenuBar () );
addItemListener ( new ItemListener ()
{
@Override
public void itemStateChanged ( ItemEvent e )
{
ExampleFrame.this.setShowMenuBar ( isSelected () );
ExampleFrame.this.pack ();
}
} );
}
};
add ( new GroupPanel ( 10, showMenuBar, new WebComboBox ( new String[]{ "undecorated", "attached", "standalone" } )
{
{
addActionListener ( new ActionListener ()
{
@Override
public void actionPerformed ( ActionEvent e )
{
int i = getSelectedIndex ();
if ( i == 0 )
{
menuBar.setUndecorated ( true );
}
else
{
menuBar.setUndecorated ( false );
menuBar.setMenuBarStyle ( i == 1 ? MenuBarStyle.attached : MenuBarStyle.standalone );
}
ExampleFrame.this.pack ();
}
} );
setEnabled ( showMenuBar.isSelected () );
showMenuBar.addItemListener ( new ItemListener ()
{
@Override
public void itemStateChanged ( ItemEvent e )
{
setEnabled ( showMenuBar.isSelected () );
}
} );
}
} ) );
add ( new WebSeparator ( false, true ) );
add ( new WebCheckBox ( "Show resize corner" )
{
{
setSelected ( ExampleFrame.this.isShowResizeCorner () );
addItemListener ( new ItemListener ()
{
@Override
public void itemStateChanged ( ItemEvent e )
{
ExampleFrame.this.setShowResizeCorner ( isSelected () );
ExampleFrame.this.pack ();
}
} );
}
} );
add ( new WebSeparator ( false, true ) );
add ( new WebPanel ()
{
{
setOpaque ( false );