当前位置: 首页>>代码示例>>Java>>正文


Java ResourceMap类代码示例

本文整理汇总了Java中org.jdesktop.application.ResourceMap的典型用法代码示例。如果您正苦于以下问题:Java ResourceMap类的具体用法?Java ResourceMap怎么用?Java ResourceMap使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ResourceMap类属于org.jdesktop.application包,在下文中一共展示了ResourceMap类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: changeTextToLocale

import org.jdesktop.application.ResourceMap; //导入依赖的package包/类
private void changeTextToLocale() {
    final org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application
        .getInstance(ru.apertum.qsystem.QSystem.class).getContext()
        .getResourceMap(FWelcome.class);
    setTitle(resourceMap.getString("Form.title")); // NOI18N
    labelCaption.setText(resourceMap.getString("labelCaption.text")); // NOI18N
    buttonAdvance.setText("<html><p align=center>" + resourceMap
        .getString(advanceRegim ? "lable.reg_calcel" : "lable.adv_reg")); // NOI18N
    buttonStandAdvance.setText(resourceMap.getString("buttonStandAdvance.text")); // NOI18N
    buttonToBegin.setText(resourceMap.getString("buttonToBegin.text")); // NOI18N
    buttonBack.setText(resourceMap.getString("buttonBack.text")); // NOI18N
    labelLock.setText(resourceMap.getString("labelLock.text")); // NOI18N
    buttonInfo.setText(
        "".equals(WelcomeParams.getInstance().infoHtml) ? resourceMap
            .getString("buttonInfo.text")
            : WelcomeParams.getInstance().infoHtml); // NOI18N
    buttonResponse.setText("".equals(WelcomeParams.getInstance().responseHtml) ? resourceMap
        .getString("buttonResponse.text") : WelcomeParams.getInstance().responseHtml); // NOI18N
    buttonBackPage.setText(resourceMap.getString("buttonBackPage.text")); // NOI18N
    buttonForwardPage.setText(resourceMap.getString("buttonForwardPage.text")); // NOI18N
    labelBackPage.setText(resourceMap.getString("labelBackPage.text")); // NOI18N
    labelForwardPage.setText(resourceMap.getString("labelForwardPage.text")); // NOI18N
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:24,代码来源:FWelcome.java

示例2: changeTextToLocale

import org.jdesktop.application.ResourceMap; //导入依赖的package包/类
private void changeTextToLocale(int count) {
    final org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application
        .getInstance(ru.apertum.qsystem.QSystem.class).getContext()
        .getResourceMap(FConfirmationStart.class);
    buttonOk.setText(resourceMap.getString("buttonOk.text")); // NOI18N
    buttonCancel.setText(resourceMap.getString("buttonCancel.text")); // NOI18N
    labelInfo.setIcon(
        new File(WelcomeParams.getInstance().confirmationStartImg).exists() ? new ImageIcon(
            WelcomeParams.getInstance().confirmationStartImg) : new javax.swing.ImageIcon(
            getClass().getResource("/ru/apertum/qsystem/client/forms/resources/vopros.png")));
    labelInfo.setText(WelcomeParams.getInstance().patternConfirmationStart
        .replace("dialog.text_before", getLocaleMessage("dialod.text_before")).
            replace("dialog.count", "" + count).
            replace("dialog.text_people", getLocaleMessage("dialod.text_before_people")).
            replace("[[endRus]]",
                (((!Locale.getDefault().getLanguage().startsWith("en")) && ((count % 10) >= 2)
                    && (
                    (count % 10) <= 4)) ? "a" : ""))); // NOI18N
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:20,代码来源:FConfirmationStart2.java

示例3: defineUI

import org.jdesktop.application.ResourceMap; //导入依赖的package包/类
private void defineUI ()
{
    ApplicationContext applicationContext = OMR.gui.getApplication().getContext();
    component.setLayout(new BorderLayout());

    // Progress bar
    progressBar.setPreferredSize(new Dimension(90, 20));
    progressBar.setName("progressBar");
    progressBar.setToolTipText("Used memory / Global memory");
    progressBar.setStringPainted(true);
    component.add(progressBar, BorderLayout.CENTER);

    // Garbage collector button
    JButton button = new JButton(applicationContext.getActionMap(this).get("collectGarbage"));
    button.setBorder(UIUtil.getToolBorder());
    component.add(button, BorderLayout.EAST);

    // Remember the default foreground color
    defaultForeground = progressBar.getForeground();

    // Resource injection
    ResourceMap resource = applicationContext.getResourceMap(getClass());
    resource.injectComponents(component);
}
 
开发者ID:Audiveris,项目名称:audiveris,代码行数:25,代码来源:MemoryMeter.java

示例4: showFrame

import org.jdesktop.application.ResourceMap; //导入依赖的package包/类
/**
 * Display the UI frame.
 */
public static void showFrame ()
{
    if (frame == null) {
        frame = new JFrame();
        frame.setName("shapeColorChooserFrame");
        frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);

        frame.add(new ShapeColorChooser().component);

        // Resources injection
        ResourceMap resource = Application.getInstance().getContext().getResourceMap(
                ShapeColorChooser.class);
        resource.injectComponents(frame);
    }

    OmrGui.getApplication().show(frame);
}
 
开发者ID:Audiveris,项目名称:audiveris,代码行数:21,代码来源:ShapeColorChooser.java

示例5: defineUI

import org.jdesktop.application.ResourceMap; //导入依赖的package包/类
private void defineUI ()
{
    ApplicationContext applicationContext = MainGui.getInstance()
            .getContext();
    component.setLayout(new BorderLayout());

    // Progress bar
    progressBar.setPreferredSize(new Dimension(90, 20));
    progressBar.setName("progressBar");
    progressBar.setToolTipText("Used memory / Global memory");
    progressBar.setStringPainted(true);
    component.add(progressBar, BorderLayout.CENTER);

    // Garbage collector button
    JButton button = new JButton(
            applicationContext.getActionMap(this).get("collectGarbage"));
    button.setBorder(UIUtil.getToolBorder());
    component.add(button, BorderLayout.EAST);

    // Remember the default foreground color
    defaultForeground = progressBar.getForeground();

    // Resource injection
    ResourceMap resource = applicationContext.getResourceMap(getClass());
    resource.injectComponents(component);
}
 
开发者ID:jlpoolen,项目名称:libreveris,代码行数:27,代码来源:MemoryMeter.java

示例6: getMenu

import org.jdesktop.application.ResourceMap; //导入依赖的package包/类
public JMenu getMenu ()
{
    if (menu == null) {
        NameSet history = ScoresManager.getInstance()
                .getHistory();
        menu = history.menu("Sheet History", new HistoryListener());
        menu.setEnabled(!history.isEmpty());

        menu.setName("historyMenu");

        ResourceMap resource = MainGui.getInstance()
                .getContext()
                .getResourceMap(
                SheetActions.class);
        resource.injectComponents(menu);
    }

    return menu;
}
 
开发者ID:jlpoolen,项目名称:libreveris,代码行数:20,代码来源:SheetActions.java

示例7: showFrame

import org.jdesktop.application.ResourceMap; //导入依赖的package包/类
/**
 * Display the UI frame.
 */
public static void showFrame ()
{
    if (frame == null) {
        frame = new JFrame();
        frame.setName("shapeColorChooserFrame");
        frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);

        frame.add(new ShapeColorChooser().component);

        // Resources injection
        ResourceMap resource = Application.getInstance()
                .getContext()
                .getResourceMap(
                ShapeColorChooser.class);
        resource.injectComponents(frame);
    }

    MainGui.getInstance()
            .show(frame);
}
 
开发者ID:jlpoolen,项目名称:libreveris,代码行数:24,代码来源:ShapeColorChooser.java

示例8: SampleVerifier

import org.jdesktop.application.ResourceMap; //导入依赖的package包/类
/**
 * Create an instance of SampleVerifier.
 */
private SampleVerifier ()
{
    // Pane split vertically: selectors then browser
    JSplitPane vertSplitPane = new JSplitPane(
            JSplitPane.VERTICAL_SPLIT,
            getSelectorsPanel(),
            glyphBrowser.getComponent());
    vertSplitPane.setName("SampleVerifierSplitPane");
    vertSplitPane.setDividerSize(1);

    // Hosting frame
    frame = new JFrame();
    frame.setName("SampleVerifierFrame");
    frame.add(vertSplitPane);

    // Resource injection
    ResourceMap resource = MainGui.getInstance().getContext().
            getResourceMap(
            getClass());
    resource.injectComponents(frame);
}
 
开发者ID:jlpoolen,项目名称:libreveris,代码行数:25,代码来源:SampleVerifier.java

示例9: changeTextToLocale

import org.jdesktop.application.ResourceMap; //导入依赖的package包/类
private void changeTextToLocale() {
    final org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application
        .getInstance(ru.apertum.qsystem.QSystem.class).getContext()
        .getResourceMap(FPreInfoDialog.class);
    LabelCaption2.setText(resourceMap.getString("LabelCaption2.text")); // NOI18N
    jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
    buttonInRoot.setText(resourceMap.getString("buttonInRoot.text")); // NOI18N
    buttonBack.setText(resourceMap.getString("buttonBack.text")); // NOI18N
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:10,代码来源:FPreInfoDialog.java

示例10: changeTextToLocale

import org.jdesktop.application.ResourceMap; //导入依赖的package包/类
private void changeTextToLocale() {
    final org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application
        .getInstance(ru.apertum.qsystem.QSystem.class).getContext()
        .getResourceMap(FAdvanceCalendar.class);
    buttonClose.setText(resourceMap.getString("buttonClose.text")); // NOI18N
    jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
    jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
    jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:10,代码来源:FAdvanceCalendar.java

示例11: changeTextToLocale

import org.jdesktop.application.ResourceMap; //导入依赖的package包/类
private void changeTextToLocale() {
    final org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application
        .getInstance(ru.apertum.qsystem.QSystem.class).getContext()
        .getResourceMap(FStandAdvance.class);
    jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
    jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
    DEFAULT_KOD = getLocaleMessage("dialog.default_code");
    labelKod.setText(DEFAULT_KOD);
    jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:11,代码来源:FStandAdvance.java

示例12: changeTextToLocale

import org.jdesktop.application.ResourceMap; //导入依赖的package包/类
private void changeTextToLocale() {
    final org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application
        .getInstance(ru.apertum.qsystem.QSystem.class).getContext()
        .getResourceMap(FConfirmationStart.class);
    buttonOk.setText(resourceMap.getString("buttonOk.text")); // NOI18N
    buttonCancel.setText(resourceMap.getString("buttonCancel.text")); // NOI18N
    jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
    jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
    labelInfo.setText(resourceMap.getString("labelInfo.text")); // NOI18N
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:11,代码来源:FConfirmationStart.java

示例13: changeTextToLocale

import org.jdesktop.application.ResourceMap; //导入依赖的package包/类
private void changeTextToLocale() {
    final org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application
        .getInstance(ru.apertum.qsystem.QSystem.class).getContext()
        .getResourceMap(FResponseDialog.class);
    LabelCaption.setText(resourceMap.getString("LabelCaption.text")); // NOI18N
    jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N

    buttonInRoot.setText(resourceMap.getString("buttonInRoot.text")); // NOI18N
    buttonBack.setText(resourceMap.getString("buttonBack.text")); // NOI18N
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:11,代码来源:FResponseDialog.java

示例14: changeTextToLocale

import org.jdesktop.application.ResourceMap; //导入依赖的package包/类
private void changeTextToLocale() {
    final org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application
        .getInstance(ru.apertum.qsystem.QSystem.class).getContext()
        .getResourceMap(FInfoDialog.class);
    LabelCaption2.setText(resourceMap.getString("LabelCaption2.text")); // NOI18N
    jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
    buttonInRoot.setText(resourceMap.getString("buttonInRoot.text")); // NOI18N
    buttonBack.setText(resourceMap.getString("buttonBack.text")); // NOI18N
    buttonPrint.setText(resourceMap.getString("buttonPrint.text")); // NOI18N
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:11,代码来源:FInfoDialog.java

示例15: populate

import org.jdesktop.application.ResourceMap; //导入依赖的package包/类
/**
 * Fill the provided menu with one item per each history path.
 *
 * @param menu          the menu to populate
 * @param resourceClass the class to get menu resources from
 */
public void populate (JMenu menu,
                      Class<?> resourceClass)
{
    history.feedMenu(
            menu,
            new ActionListener()
    {
        @Override
        public void actionPerformed (ActionEvent e)
        {
            try {
                final String name = e.getActionCommand().trim();

                if (!name.isEmpty()) {
                    PathTask pathTask = pathTaskClass.newInstance();
                    pathTask.setPath(Paths.get(name));
                    pathTask.execute();
                }
            } catch (Exception ex) {
                logger.warn("Error in HistoryMenu " + ex, ex);
            }
        }
    });

    // Resource injection
    ResourceMap resource = OMR.gui.getApplication().getContext().getResourceMap(resourceClass);
    resource.injectComponents(menu);
    this.menu = menu;

    // Initial menu status
    menu.setEnabled(!history.isEmpty());
}
 
开发者ID:Audiveris,项目名称:audiveris,代码行数:39,代码来源:HistoryMenu.java


注:本文中的org.jdesktop.application.ResourceMap类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。