• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ResourceManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: selectFile

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
protected void selectFile() {
  ResourceManager rm = ResourceManager.all(FilePropertyEditor.class);

  JFileChooser chooser = UserPreferences.getDefaultFileChooser();
  chooser.setDialogTitle(rm.getString("FilePropertyEditor.dialogTitle"));
  chooser.setApproveButtonText(
    rm.getString("FilePropertyEditor.approveButtonText"));
  chooser.setApproveButtonMnemonic(
    rm.getChar("FilePropertyEditor.approveButtonMnemonic"));

  if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(editor)) {
    File oldFile = (File)getValue();
    File newFile = chooser.getSelectedFile();
    String text = newFile.getAbsolutePath();
    textfield.setText(text);
    firePropertyChange(oldFile, newFile);
  }
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:19,代码来源:FilePropertyEditor.java


示例2: selectFile

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
protected void selectFile() {
  ResourceManager rm = ResourceManager.all(FilePropertyEditor.class);

  JFileChooser chooser = UserPreferences.getDefaultFileChooser();
  chooser.setDialogTitle(rm.getString("FilePropertyEditor.dialogTitle"));
  chooser.setApproveButtonText(rm.getString("FilePropertyEditor.approveButtonText"));
  chooser.setApproveButtonMnemonic(rm.getChar("FilePropertyEditor.approveButtonMnemonic"));
  customizeFileChooser(chooser);

  if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(editor)) {
    File oldFile = (File) getValue();
    File newFile = chooser.getSelectedFile();
    String text = newFile.getAbsolutePath();
    textfield.setText(text);
    firePropertyChange(oldFile, newFile);
  }
}
 
开发者ID:calibre2opds,项目名称:calibre2opds,代码行数:18,代码来源:FilePropertyEditor.java


示例3: selectFile

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
protected void selectFile() {
  ResourceManager rm = ResourceManager.all(FilePropertyEditor.class);

  JFileChooser chooser = UserPreferences.getDefaultDirectoryChooser();

  chooser.setDialogTitle(rm.getString("DirectoryPropertyEditor.dialogTitle"));
  chooser.setApproveButtonText(rm.getString("DirectoryPropertyEditor.approveButtonText"));
  chooser.setApproveButtonMnemonic(rm.getChar("DirectoryPropertyEditor.approveButtonMnemonic"));

  File oldFile = (File) getValue();
  if (oldFile != null && oldFile.isDirectory()) {
    try {
      chooser.setCurrentDirectory(oldFile.getCanonicalFile());
    } catch (IOException e) {
      e.printStackTrace();
    }
  }

  if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(editor)) {
    File newFile = chooser.getSelectedFile();
    String text = newFile.getAbsolutePath();
    textfield.setText(text);
    firePropertyChange(oldFile, newFile);
  }
}
 
开发者ID:calibre2opds,项目名称:calibre2opds,代码行数:26,代码来源:DirectoryPropertyEditor.java


示例4: selectFile

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
protected void selectFile() {
  ResourceManager rm = ResourceManager.all(FilePropertyEditor.class);

  JFileChooser chooser = UserPreferences.getDefaultFileChooser();
  chooser.setDialogTitle(rm.getString("FilePropertyEditor.dialogTitle"));
  chooser.setApproveButtonText(
    rm.getString("FilePropertyEditor.approveButtonText"));
  chooser.setApproveButtonMnemonic(
    rm.getChar("FilePropertyEditor.approveButtonMnemonic"));
  customizeFileChooser(chooser);
  
  if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(editor)) {
    File oldFile = (File)getValue();
    File newFile = chooser.getSelectedFile();
    String text = newFile.getAbsolutePath();
    textfield.setText(text);
    firePropertyChange(oldFile, newFile);
  }
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:20,代码来源:FilePropertyEditor.java


示例5: ToggleModeAction

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
public ToggleModeAction() {
  super("toggle", IconPool.shared().get(
      PropertySheet.class.getResource("icons/category.gif")));
  putValue(Action.SHORT_DESCRIPTION, ResourceManager.get(
      PropertySheet.class).getString(
      "PropertySheetPanel.category.shortDescription"));
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:8,代码来源:PropertySheetPanel.java


示例6: ToggleDescriptionAction

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
public ToggleDescriptionAction() {
  super("toggleDescription", IconPool.shared().get(
      PropertySheet.class.getResource("icons/description.gif")));
  putValue(Action.SHORT_DESCRIPTION, ResourceManager.get(
      PropertySheet.class).getString(
      "PropertySheetPanel.description.shortDescription"));
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:8,代码来源:PropertySheetPanel.java


示例7: ToggleSortingAction

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
public ToggleSortingAction() {
  super("toggleSorting", IconPool.shared().get(
      PropertySheet.class.getResource("icons/sort.gif")));
  putValue(Action.SHORT_DESCRIPTION, ResourceManager.get(
      PropertySheet.class).getString(
      "PropertySheetPanel.sort.shortDescription"));
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:8,代码来源:PropertySheetPanel.java


示例8: BooleanPropertyEditor

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
public BooleanPropertyEditor() {
  super();
  Object[] values = new Object[]{
      new Value(Boolean.TRUE, ResourceManager.common().getString("true")),
      new Value(Boolean.FALSE, ResourceManager.common().getString("false"))
  };
  setAvailableValues(values);
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:9,代码来源:BooleanPropertyEditor.java


示例9: selectColor

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
protected void selectColor() {
  ResourceManager rm = ResourceManager.all(FilePropertyEditor.class);
  String title = rm.getString("ColorPropertyEditor.title");
  Color selectedColor = JColorChooser.showDialog(editor, title, color);

  if (selectedColor != null) {
    Color oldColor = color;
    Color newColor = selectedColor;
    label.setValue(newColor);
    color = newColor;
    firePropertyChange(oldColor, newColor);
  }
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:14,代码来源:ColorPropertyEditor.java


示例10: selectFont

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
protected void selectFont() {
  ResourceManager rm = ResourceManager.all(FontPropertyEditor.class);
  String title = rm.getString("FontPropertyEditor.title");
  
  Font selectedFont = JFontChooser.showDialog(editor, title, font);

  if (selectedFont != null) {
    Font oldFont = font;
    Font newFont = selectedFont;
    label.setValue(newFont);
    font = newFont;
    firePropertyChange(oldFont, newFont);
  }
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:15,代码来源:FontPropertyEditor.java


示例11: selectFile

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
protected void selectFile() {
  ResourceManager rm = ResourceManager.all(FilePropertyEditor.class);

  JFileChooser chooser = UserPreferences.getDefaultDirectoryChooser();
  
  chooser.setDialogTitle(rm.getString("DirectoryPropertyEditor.dialogTitle"));
  chooser.setApproveButtonText(
      rm.getString("DirectoryPropertyEditor.approveButtonText"));
  chooser.setApproveButtonMnemonic(
      rm.getChar("DirectoryPropertyEditor.approveButtonMnemonic"));

  File oldFile = (File)getValue();
  if (oldFile != null && oldFile.isDirectory()) {
    try {
      chooser.setCurrentDirectory(oldFile.getCanonicalFile());
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
  
  if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(editor)) {
    File newFile = chooser.getSelectedFile();
    String text = newFile.getAbsolutePath();
    textfield.setText(text);
    firePropertyChange(oldFile, newFile);
  }
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:28,代码来源:DirectoryPropertyEditor.java


示例12: getText

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
public String getText(Object object) {
  if (object == null) {
    return null;
  }

  // lookup the shared ConverterRegistry
  try {
    return (String)ConverterRegistry.instance().convert(String.class, object);
  } catch (IllegalArgumentException e) {
  }

  if (object instanceof Boolean) {
    return Boolean.TRUE.equals(object)
      ? ResourceManager.common().getString("true")
      : ResourceManager.common().getString("false");
  }

  if (object instanceof File) {
    return ((File)object).getAbsolutePath();
  }

  StringBuffer buffer = new StringBuffer();
  if (idVisible && object instanceof HasId) {
    buffer.append(((HasId)object).getId());
  }
  if (object instanceof TitledObject) {
    buffer.append(((TitledObject)object).getTitle());
  }
  if (!(object instanceof HasId || object instanceof TitledObject)) {
    buffer.append(String.valueOf(object));
  }
  return buffer.toString();
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:34,代码来源:DefaultObjectRenderer.java


示例13: setDialogMode

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
/**
 * Sets the mode of this dialog. Default mode is
 * {@link BaseDialog#OK_CANCEL_DIALOG}
 * 
 * @param mode {@link BaseDialog#OK_CANCEL_DIALOG}or
 *          {@link BaseDialog#CLOSE_DIALOG}
 */
public void setDialogMode(int mode) {
  if (!(mode == OK_CANCEL_DIALOG || mode == CLOSE_DIALOG)) {
    throw new IllegalArgumentException("invalid dialog mode");
  }

  if (okButton != null) {
    buttonPane.remove(okButton);
    okButton = null;
  }
  if (cancelOrCloseButton != null) {
    buttonPane.remove(cancelOrCloseButton);
    cancelOrCloseButton = null;
  }

  switch (mode) {
    case OK_CANCEL_DIALOG :
      okButton =
        new JButton(ResourceManager.all(BaseDialog.class).getString("ok"));
      okButton.addActionListener(okAction);
      buttonPane.add(okButton);
      cancelOrCloseButton =
        new JButton(
          ResourceManager.all(BaseDialog.class).getString("cancel"));
      cancelOrCloseButton.addActionListener(cancelOrCloseAction);
      buttonPane.add(cancelOrCloseButton);
      break;
    case CLOSE_DIALOG :
      cancelOrCloseButton =
        new JButton(ResourceManager.all(BaseDialog.class).getString("close"));
      cancelOrCloseButton.addActionListener(cancelOrCloseAction);
      buttonPane.add(cancelOrCloseButton);
      break;
  }

  this.mode = mode;
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:44,代码来源:BaseDialog.java


示例14: installStrings

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
protected void installStrings(JFileChooser fc) {
  super.installStrings(fc);

  saveButtonToolTipText =
    ResourceManager.get(DirectoryChooserUI.class).getString(
      "DirectoryChooser.saveButtonToolTipText");
  openButtonToolTipText =
    ResourceManager.get(DirectoryChooserUI.class).getString(
      "DirectoryChooser.openButtonToolTipText");
  cancelButtonToolTipText =
    ResourceManager.get(DirectoryChooserUI.class).getString(
      "DirectoryChooser.cancelButtonToolTipText");
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:14,代码来源:WindowsDirectoryChooserUI.java


示例15: selectFont

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
protected void selectFont() {
  ResourceManager rm = ResourceManager.all(FontPropertyEditor.class);
  String title = rm.getString("FontPropertyEditor.title");

  Font selectedFont = JFontChooser.showDialog(editor, title, font);

  if (selectedFont != null) {
    Font oldFont = font;
    Font newFont = selectedFont;
    label.setValue(newFont);
    font = newFont;
    firePropertyChange(oldFont, newFont);
  }
}
 
开发者ID:calibre2opds,项目名称:calibre2opds,代码行数:15,代码来源:FontPropertyEditor.java


示例16: getText

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
public String getText(Object object) {
  if (object == null) {
    return null;
  }

  // lookup the shared ConverterRegistry
  try {
    return (String) ConverterRegistry.instance().convert(String.class, object);
  } catch (IllegalArgumentException e) {
  }

  if (object instanceof Boolean) {
    return Boolean.TRUE.equals(object) ? ResourceManager.common().getString("true") : ResourceManager.common().getString("false");
  }

  if (object instanceof File) {
    return ((File) object).getAbsolutePath();
  }

  StringBuffer buffer = new StringBuffer();
  if (idVisible && object instanceof HasId) {
    buffer.append(((HasId) object).getId());
  }
  if (object instanceof TitledObject) {
    buffer.append(((TitledObject) object).getTitle());
  }
  if (!(object instanceof HasId || object instanceof TitledObject)) {
    buffer.append(String.valueOf(object));
  }
  return buffer.toString();
}
 
开发者ID:calibre2opds,项目名称:calibre2opds,代码行数:32,代码来源:DefaultObjectRenderer.java


示例17: setDialogMode

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
/**
 * Sets the mode of this dialog. Default mode is
 * {@link BaseDialog#OK_CANCEL_DIALOG}
 *
 * @param mode {@link BaseDialog#OK_CANCEL_DIALOG}or
 *             {@link BaseDialog#CLOSE_DIALOG}
 */
public void setDialogMode(int mode) {
  if (!(mode == OK_CANCEL_DIALOG || mode == CLOSE_DIALOG)) {
    throw new IllegalArgumentException("invalid dialog mode");
  }

  if (okButton != null) {
    buttonPane.remove(okButton);
    okButton = null;
  }
  if (cancelOrCloseButton != null) {
    buttonPane.remove(cancelOrCloseButton);
    cancelOrCloseButton = null;
  }

  switch (mode) {
    case OK_CANCEL_DIALOG:
      okButton = new JButton(ResourceManager.all(BaseDialog.class).getString("ok"));
      okButton.addActionListener(okAction);
      buttonPane.add(okButton);
      cancelOrCloseButton = new JButton(ResourceManager.all(BaseDialog.class).getString("cancel"));
      cancelOrCloseButton.addActionListener(cancelOrCloseAction);
      buttonPane.add(cancelOrCloseButton);
      getRootPane().setDefaultButton(okButton);
      break;
    case CLOSE_DIALOG:
      cancelOrCloseButton = new JButton(ResourceManager.all(BaseDialog.class).getString("close"));
      cancelOrCloseButton.addActionListener(cancelOrCloseAction);
      buttonPane.add(cancelOrCloseButton);
      break;
  }

  this.mode = mode;
}
 
开发者ID:calibre2opds,项目名称:calibre2opds,代码行数:41,代码来源:BaseDialog.java


示例18: ToggleModeAction

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
@SuppressWarnings("OverridableMethodCallInConstructor")
ToggleModeAction() {
    super("toggle", IconPool.shared().get(
            PropertySheet.class.getResource("icons/category.gif")));
    putValue(Action.SHORT_DESCRIPTION, ResourceManager.get(
            PropertySheet.class).getString(
                    "PropertySheetPanel.category.shortDescription"));
}
 
开发者ID:ZenHarbinger,项目名称:l2fprod-properties-editor,代码行数:9,代码来源:PropertySheetPanel.java


示例19: ToggleDescriptionAction

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
@SuppressWarnings("OverridableMethodCallInConstructor")
ToggleDescriptionAction() {
    super("toggleDescription", IconPool.shared().get(
            PropertySheet.class.getResource("icons/description.gif")));
    putValue(Action.SHORT_DESCRIPTION, ResourceManager.get(
            PropertySheet.class).getString(
                    "PropertySheetPanel.description.shortDescription"));
}
 
开发者ID:ZenHarbinger,项目名称:l2fprod-properties-editor,代码行数:9,代码来源:PropertySheetPanel.java


示例20: ToggleSortingAction

import com.l2fprod.common.util.ResourceManager; //导入依赖的package包/类
@SuppressWarnings("OverridableMethodCallInConstructor")
ToggleSortingAction() {
    super("toggleSorting", IconPool.shared().get(
            PropertySheet.class.getResource("icons/sort.gif")));
    putValue(Action.SHORT_DESCRIPTION, ResourceManager.get(
            PropertySheet.class).getString(
                    "PropertySheetPanel.sort.shortDescription"));
}
 
开发者ID:ZenHarbinger,项目名称:l2fprod-properties-editor,代码行数:9,代码来源:PropertySheetPanel.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java XAxisRendererRadarChart类代码示例发布时间:2022-05-22
下一篇:
Java Timer类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap