本文整理汇总了Java中org.springframework.richclient.util.GuiStandardUtils类的典型用法代码示例。如果您正苦于以下问题:Java GuiStandardUtils类的具体用法?Java GuiStandardUtils怎么用?Java GuiStandardUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GuiStandardUtils类属于org.springframework.richclient.util包,在下文中一共展示了GuiStandardUtils类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.springframework.richclient.util.GuiStandardUtils; //导入依赖的package包/类
private void init( Messagable delegate ) {
this.messageAreaModel = new DefaultMessageAreaModel( delegate );
this.messageAreaModel.addPropertyChangeListener( this );
iconLabel = new JLabel();
messageArea = new HtmlPane();
Font defaultFont = UIManager.getFont( "Button.font" );
String stylesheet = "body { font-family: " + defaultFont.getName() + "; font-size: " + defaultFont.getSize()
+ "pt; }" + "a, p, li { font-family: " + defaultFont.getName() + "; font-size: "
+ defaultFont.getSize() + "pt; }";
try {
((HTMLDocument) messageArea.getDocument()).getStyleSheet().loadRules( new StringReader( stylesheet ), null );
} catch( IOException e ) {
}
GuiStandardUtils.textComponentAsLabel( messageArea );
messageArea.setFont( new JLabel().getFont() );
messageArea.setFocusable(false);
}
示例2: createDialogContentPane
import org.springframework.richclient.util.GuiStandardUtils; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* Creates an additional panel at the top containing a title/message area.
* This can be used in conjunction with validation reporters to show the
* most recent error or to simply show a title and a description of the
* current Dialog.
*
* Use {@link #createTitledDialogContentPane()} to add your custom components.
*/
protected JComponent createDialogContentPane() {
pageControl = new JPanel(new BorderLayout());
JPanel titlePaneContainer = new JPanel(new BorderLayout());
setMessage(getDescription());
titlePaneContainer.add(titlePane.getControl());
titlePaneContainer.add(new JSeparator(), BorderLayout.SOUTH);
pageControl.add(titlePaneContainer, BorderLayout.NORTH);
contentPane = createTitledDialogContentPane();
if (getPreferredSize() != null) {
contentPane.setPreferredSize(getPreferredSize());
}
GuiStandardUtils.attachDialogBorder(contentPane);
pageControl.add(contentPane);
return pageControl;
}
示例3: addDialogComponents
import org.springframework.richclient.util.GuiStandardUtils; //导入依赖的package包/类
protected void addDialogComponents()
{
JComponent dialogContentPane = createDialogContentPane();
if (getPreferredSize() != null)
{
dialogContentPane.setSize(getPreferredSize());
}
if (!(this.widget instanceof TitledWidget))
{
GuiStandardUtils.attachDialogBorder(dialogContentPane);
}
getDialogContentPane().add(dialogContentPane);
getDialogContentPane().add(createButtonBar(), BorderLayout.SOUTH);
if (this.titledWidgetId != null)
((ApplicationObjectConfigurer) Application.services().getService(
ApplicationObjectConfigurer.class)).configure(this.widget, this.titledWidgetId);
}
示例4: createStandardView
import org.springframework.richclient.util.GuiStandardUtils; //导入依赖的package包/类
/**
* Construct a complete standard layout for a dialog page. This is a panel with the
* title/message area at the top, the dialog page control in the center, and the
* command button bar (using the provided group of commands) on the bottom. You should
* have already wired any commands to the page complete status as needed.
*
* @param dialogPage to process
* @param commandGroupMembers Array of commands to place in the button bar
* @return created component
* @see #createTitlePane(DialogPage)
* @see #adaptPageCompletetoGuarded(DialogPage, Guarded)
*/
public static JComponent createStandardView( DialogPage dialogPage, Object[] commandGroupMembers ) {
JPanel viewPanel = new JPanel(new BorderLayout());
JPanel titlePaneContainer = new JPanel(new BorderLayout());
titlePaneContainer.add(createTitlePane(dialogPage).getControl());
titlePaneContainer.add(new JSeparator(), BorderLayout.SOUTH);
viewPanel.add(titlePaneContainer, BorderLayout.NORTH);
JComponent pageControl = dialogPage.getControl();
GuiStandardUtils.attachDialogBorder(pageControl);
viewPanel.add(pageControl);
viewPanel.add(createButtonBar(commandGroupMembers), BorderLayout.SOUTH);
return viewPanel;
}
示例5: createComponents
import org.springframework.richclient.util.GuiStandardUtils; //导入依赖的package包/类
/**
* createComponents.
*
* @return pageControl
*/
private JPanel createComponents() {
final TitlePane titlePane = new TitlePane();
initStandardCommands();
final JPanel pageControl = new JPanel(new BorderLayout());
final JPanel titlePaneContainer = new JPanel(new BorderLayout());
titlePane.setTitle(bagView.getPropertyMessage("NewBagInPlace.title"));
titlePane.setMessage(
new DefaultMessage(bagView.getPropertyMessage("NewBagInPlace" + ".description")));
titlePaneContainer.add(titlePane.getControl());
titlePaneContainer.add(new JSeparator(), BorderLayout.SOUTH);
pageControl.add(titlePaneContainer, BorderLayout.NORTH);
final JPanel contentPanel = new JPanel(new GridBagLayout());
contentPanel.setBorder(new EmptyBorder(10, 10, 10, 10));
int row = 0;
layoutSelectDataContent(contentPanel, row++);
layoutProfileSelectionContent(contentPanel, row++);
layoutAddKeepFilesToEmptyCheckBox(contentPanel, row++);
layoutSpacer(contentPanel, row++);
GuiStandardUtils.attachDialogBorder(contentPanel);
pageControl.add(contentPanel);
final JComponent buttonBar = createButtonBar();
pageControl.add(buttonBar, BorderLayout.SOUTH);
this.pack();
return pageControl;
}
示例6: createButtonBar
import org.springframework.richclient.util.GuiStandardUtils; //导入依赖的package包/类
/**
* createButtonBar.
*
* @return buttonBar
*/
protected JComponent createButtonBar() {
final CommandGroup dialogCommandGroup =
CommandGroup.createCommandGroup(null, getCommandGroupMembers());
final JComponent buttonBar = dialogCommandGroup.createButtonBar();
GuiStandardUtils.attachDialogBorder(buttonBar);
return buttonBar;
}
示例7: createComponents
import org.springframework.richclient.util.GuiStandardUtils; //导入依赖的package包/类
/**
* createComponents.
*
* @return pageControl
*/
private JPanel createComponents() {
final TitlePane titlePane = new TitlePane();
initStandardCommands();
final JPanel pageControl = new JPanel(new BorderLayout());
final JPanel titlePaneContainer = new JPanel(new BorderLayout());
titlePane.setTitle(bagView.getPropertyMessage("NewBagFrame.title"));
titlePane.setMessage(
new DefaultMessage(bagView.getPropertyMessage("NewBagFrame" + ".description")));
titlePaneContainer.add(titlePane.getControl());
titlePaneContainer.add(new JSeparator(), BorderLayout.SOUTH);
pageControl.add(titlePaneContainer, BorderLayout.NORTH);
final JPanel contentPane = new JPanel();
contentPane.setLayout(new GridBagLayout());
int row = 0;
layoutBagVersionSelection(contentPane, row++);
layoutProfileSelection(contentPane, row++);
if (getPreferredSize() != null) {
contentPane.setPreferredSize(getPreferredSize());
}
GuiStandardUtils.attachDialogBorder(contentPane);
pageControl.add(contentPane);
final JComponent buttonBar = createButtonBar();
pageControl.add(buttonBar, BorderLayout.SOUTH);
this.pack();
return pageControl;
}
示例8: createButtonBar
import org.springframework.richclient.util.GuiStandardUtils; //导入依赖的package包/类
/**
* createButtonBar.
*
* @return buttonBar
*/
private JComponent createButtonBar() {
final CommandGroup dialogCommandGroup =
CommandGroup.createCommandGroup(null, getCommandGroupMembers());
final JComponent buttonBar = dialogCommandGroup.createButtonBar();
GuiStandardUtils.attachDialogBorder(buttonBar);
return buttonBar;
}
示例9: prepareDialogPage
import org.springframework.richclient.util.GuiStandardUtils; //导入依赖的package包/类
/**
* Prepare a dialog page - Add our property listeners and configure the
* control's look.
* @param page to process
*/
protected void prepareDialogPage(DialogPage page) {
page.addPropertyChangeListener(childChangeHandler);
JComponent c = page.getControl();
GuiStandardUtils.attachDialogBorder(c);
Dimension size = c.getPreferredSize();
if (size.width > largestPageWidth) {
largestPageWidth = size.width;
}
if (size.height > largestPageHeight) {
largestPageHeight = size.height;
}
}
示例10: createButtonBar
import org.springframework.richclient.util.GuiStandardUtils; //导入依赖的package包/类
/**
* Return a standardized row of command buttons.
*
* @param groupMembers
* @return button bar
*/
public static JComponent createButtonBar( Object[] groupMembers ) {
CommandGroup dialogCommandGroup = CommandGroup.createCommandGroup(null, groupMembers);
JComponent buttonBar = dialogCommandGroup.createButtonBar();
GuiStandardUtils.attachDialogBorder(buttonBar);
return buttonBar;
}
示例11: addDialogComponents
import org.springframework.richclient.util.GuiStandardUtils; //导入依赖的package包/类
/**
* Subclasses may override to customize how this dialog is built.
*/
protected void addDialogComponents() {
JComponent dialogContentPane = createDialogContentPane();
GuiStandardUtils.attachDialogBorder(dialogContentPane);
if (getPreferredSize() != null) {
dialogContentPane.setPreferredSize(getPreferredSize());
}
getDialogContentPane().add(dialogContentPane);
getDialogContentPane().add(createButtonBar(), BorderLayout.SOUTH);
}
示例12: createButtonBar
import org.springframework.richclient.util.GuiStandardUtils; //导入依赖的package包/类
/**
* Return a standardized row of command buttons, right-justified and all of
* the same size, with OK as the default button, and no mnemonics used, as
* per the Java Look and Feel guidelines.
*/
protected JComponent createButtonBar() {
this.dialogCommandGroup = CommandGroup.createCommandGroup(null, getCommandGroupMembers());
JComponent buttonBar = this.dialogCommandGroup.createButtonBar();
GuiStandardUtils.attachDialogBorder(buttonBar);
return buttonBar;
}
示例13: createFirstPageButtonBar
import org.springframework.richclient.util.GuiStandardUtils; //导入依赖的package包/类
protected JComponent createFirstPageButtonBar() {
CommandGroup dialogCommandGroup = CommandGroup.createCommandGroup(null, getIntroPageCommandGroupMembers());
JComponent buttonBar = dialogCommandGroup.createButtonBar();
GuiStandardUtils.attachDialogBorder(buttonBar);
buttonBar.setOpaque(false);
return buttonBar;
}
示例14: createPageControls
import org.springframework.richclient.util.GuiStandardUtils; //导入依赖的package包/类
/**
* Allow the wizard's pages to pre-create their page controls. This allows
* the wizard dialog to open to the correct size.
*/
private void createPageControls() {
WizardPage[] pages = wizard.getPages();
for (int i = 0; i < pages.length; i++) {
JComponent c = pages[i].getControl();
GuiStandardUtils.attachDialogBorder(c);
Dimension size = c.getPreferredSize();
if (size.width > largestPageWidth) {
largestPageWidth = size.width;
}
if (size.height > largestPageHeight) {
largestPageHeight = size.height;
}
}
}
示例15: createWizardIndex
import org.springframework.richclient.util.GuiStandardUtils; //导入依赖的package包/类
private Component createWizardIndex()
{
JPanel indexPanel = new JPanel(new FormLayout(
new ColumnSpec[]{
new ColumnSpec(ColumnSpec.CENTER, Sizes.DEFAULT, FormSpec.NO_GROW)
},
new RowSpec[]{
new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
FormFactory.UNRELATED_GAP_ROWSPEC,
new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
FormFactory.UNRELATED_GAP_ROWSPEC,
new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),
}));
CellConstraints cc = new CellConstraints();
GuiStandardUtils.attachBorder(indexPanel, BorderFactory.createEmptyBorder(5, 5, 5, 5));
indexPanel.add(createWizardTitle(), cc.xy(1, 1));
WizardPage[] pages = wizard.getPages();
DefaultFormBuilder builder = new DefaultFormBuilder(new FormLayout(
"right:pref, 3dlu, left:pref", ""));
JLabel indexNumber;
JLabel indexTitle;
for (int i = 0; i < pages.length; ++i)
{
indexNumber = new JLabel(Integer.toString(i + 1) + ".");
indexNumber.setName(Integer.toString(i + 1));
indexTitle = new JLabel(pages[i].getTitle());
indexNumbers.put(pages[i].getTitle(), indexNumber);
indexComponents.put(pages[i].getTitle(), indexTitle);
builder.append(indexNumber);
builder.append(indexTitle);
if (i < pages.length - 1)
builder.nextLine();
}
indexPanel.add(builder.getPanel(), cc.xy(1, 3));
indexPanel.add(createStepNofMPanel(pages.length), cc.xy(1, 5));
return indexPanel;
}