本文整理汇总了Java中net.sf.memoranda.ui.htmleditor.util.Local类的典型用法代码示例。如果您正苦于以下问题:Java Local类的具体用法?Java Local怎么用?Java Local使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Local类属于net.sf.memoranda.ui.htmleditor.util包,在下文中一共展示了Local类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: colorB_actionPerformed
import net.sf.memoranda.ui.htmleditor.util.Local; //导入依赖的package包/类
void colorB_actionPerformed(ActionEvent e) {
// Fix until Sun's JVM supports more locales...
UIManager.put(
"ColorChooser.swatchesNameText",
Local.getString("Swatches"));
UIManager.put("ColorChooser.hsbNameText", Local.getString("HSB"));
UIManager.put("ColorChooser.rgbNameText", Local.getString("RGB"));
UIManager.put(
"ColorChooser.swatchesRecentText",
Local.getString("Recent:"));
UIManager.put("ColorChooser.previewText", Local.getString("Preview"));
UIManager.put(
"ColorChooser.sampleText",
Local.getString("Sample Text")
+ " "
+ Local.getString("Sample Text"));
UIManager.put("ColorChooser.okText", Local.getString("OK"));
UIManager.put("ColorChooser.cancelText", Local.getString("Cancel"));
UIManager.put("ColorChooser.resetText", Local.getString("Reset"));
UIManager.put("ColorChooser.hsbHueText", Local.getString("H"));
UIManager.put("ColorChooser.hsbSaturationText", Local.getString("S"));
UIManager.put("ColorChooser.hsbBrightnessText", Local.getString("B"));
UIManager.put("ColorChooser.hsbRedText", Local.getString("R"));
UIManager.put("ColorChooser.hsbGreenText", Local.getString("G"));
UIManager.put("ColorChooser.hsbBlueText", Local.getString("B2"));
UIManager.put("ColorChooser.rgbRedText", Local.getString("Red"));
UIManager.put("ColorChooser.rgbGreenText", Local.getString("Green"));
UIManager.put("ColorChooser.rgbBlueText", Local.getString("Blue"));
Color c = JColorChooser.showDialog(this, Local.getString("Font color"),
Util.decodeColor(colorField.getText()));
if (c == null) return;
colorField.setText(Util.encodeColor(c));
Util.setColorField(colorField);
sample.setForeground(c);
}
示例2: LinkDialog
import net.sf.memoranda.ui.htmleditor.util.Local; //导入依赖的package包/类
public LinkDialog(Frame frame) {
super(frame, Local.getString("Insert hyperlink"), true);
try {
jbInit();
pack();
}
catch(Exception ex) {
ex.printStackTrace();
}
}
示例3: ElementDialog
import net.sf.memoranda.ui.htmleditor.util.Local; //导入依赖的package包/类
public ElementDialog(Frame frame) {
super(frame, Local.getString("Object properties"), true);
try {
jbInit();
pack();
}
catch(Exception ex) {
ex.printStackTrace();
}
}
示例4: TdDialog
import net.sf.memoranda.ui.htmleditor.util.Local; //导入依赖的package包/类
public TdDialog(Frame frame) {
super(frame, Local.getString("Table properties"), true);
try {
jbInit();
pack();
}
catch(Exception ex) {
ex.printStackTrace();
}
}
示例5: FontDialog
import net.sf.memoranda.ui.htmleditor.util.Local; //导入依赖的package包/类
public FontDialog(Frame frame) {
super(frame, Local.getString("Text properties"), true);
try {
jbInit();
pack();
}
catch (Exception ex) {
ex.printStackTrace();
}
}
示例6: update
import net.sf.memoranda.ui.htmleditor.util.Local; //导入依赖的package包/类
protected void update() {
if (undo.canUndo()) {
setEnabled(true);
putValue(
Action.SHORT_DESCRIPTION,
undo.getUndoPresentationName());
} else {
setEnabled(false);
putValue(Action.SHORT_DESCRIPTION, Local.getString("Undo"));
}
}
示例7: RedoAction
import net.sf.memoranda.ui.htmleditor.util.Local; //导入依赖的package包/类
public RedoAction() {
super(Local.getString("Redo"));
setEnabled(false);
putValue(
Action.SMALL_ICON,
new ImageIcon(cl.getResource("resources/icons/redo16.png")));
putValue(
Action.ACCELERATOR_KEY,
KeyStroke.getKeyStroke(
KeyEvent.VK_Z,
KeyEvent.CTRL_MASK + KeyEvent.SHIFT_MASK));
}
示例8: update
import net.sf.memoranda.ui.htmleditor.util.Local; //导入依赖的package包/类
protected void update() {
if (undo.canRedo()) {
setEnabled(true);
putValue(
Action.SHORT_DESCRIPTION,
undo.getRedoPresentationName());
} else {
setEnabled(false);
putValue(Action.SHORT_DESCRIPTION, Local.getString("Redo"));
}
}
示例9: setElementProperties
import net.sf.memoranda.ui.htmleditor.util.Local; //导入依赖的package包/类
void setElementProperties(Element el, String id, String cls, String sty) {
ElementDialog dlg = new ElementDialog(null);
//dlg.setLocation(linkActionB.getLocationOnScreen());
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = this.getSize();
Point loc = this.getLocationOnScreen();
dlg.setLocation(
(frmSize.width - dlgSize.width) / 2 + loc.x,
(frmSize.height - dlgSize.height) / 2 + loc.y);
dlg.setModal(true);
dlg.setTitle(Local.getString("Object properties"));
dlg.idField.setText(id);
dlg.classField.setText(cls);
dlg.styleField.setText(sty);
// Uncommented, returns a simple p into the header... fix needed ?
//dlg.header.setText(el.getName());
dlg.setVisible(true);
if (dlg.CANCELLED)
return;
SimpleAttributeSet attrs = new SimpleAttributeSet(el.getAttributes());
if (dlg.idField.getText().length() > 0)
attrs.addAttribute(HTML.Attribute.ID, dlg.idField.getText());
if (dlg.classField.getText().length() > 0)
attrs.addAttribute(HTML.Attribute.CLASS, dlg.classField.getText());
if (dlg.styleField.getText().length() > 0)
attrs.addAttribute(HTML.Attribute.STYLE, dlg.styleField.getText());
document.setParagraphAttributes(el.getStartOffset(), 0, attrs, true);
}
示例10: colorB_actionPerformed
import net.sf.memoranda.ui.htmleditor.util.Local; //导入依赖的package包/类
void colorB_actionPerformed(ActionEvent e) {
// Fix until Sun's JVM supports more locales...
UIManager.put(
"ColorChooser.swatchesNameText",
Local.getString("Swatches"));
UIManager.put("ColorChooser.hsbNameText", Local.getString("HSB"));
UIManager.put("ColorChooser.rgbNameText", Local.getString("RGB"));
UIManager.put(
"ColorChooser.swatchesRecentText",
Local.getString("Recent:"));
UIManager.put("ColorChooser.previewText", Local.getString("Preview"));
UIManager.put(
"ColorChooser.sampleText",
Local.getString("Sample Text")
+ " "
+ Local.getString("Sample Text"));
UIManager.put("ColorChooser.okText", Local.getString("OK"));
UIManager.put("ColorChooser.cancelText", Local.getString("Cancel"));
UIManager.put("ColorChooser.resetText", Local.getString("Reset"));
UIManager.put("ColorChooser.hsbHueText", Local.getString("H"));
UIManager.put("ColorChooser.hsbSaturationText", Local.getString("S"));
UIManager.put("ColorChooser.hsbBrightnessText", Local.getString("B"));
UIManager.put("ColorChooser.hsbRedText", Local.getString("R"));
UIManager.put("ColorChooser.hsbGreenText", Local.getString("G"));
UIManager.put("ColorChooser.hsbBlueText", Local.getString("B2"));
UIManager.put("ColorChooser.rgbRedText", Local.getString("Red"));
UIManager.put("ColorChooser.rgbGreenText", Local.getString("Green"));
UIManager.put("ColorChooser.rgbBlueText", Local.getString("Blue"));
Color c = JColorChooser.showDialog(this, Local.getString("Font color"),
HtmlUtil.decodeColor(colorField.getText()));
if (c == null) return;
colorField.setText(HtmlUtil.encodeColor(c));
HtmlUtil.setColorField(colorField);
sample.setForeground(c);
}
示例11: ImageDialog
import net.sf.memoranda.ui.htmleditor.util.Local; //导入依赖的package包/类
public ImageDialog(Frame frame) {
super(frame, Local.getString("Image"), true);
try {
jbInit();
pack();
}
catch (Exception ex) {
ex.printStackTrace();
}
super.addWindowListener(this);
}
示例12: UndoAction
import net.sf.memoranda.ui.htmleditor.util.Local; //导入依赖的package包/类
public UndoAction() {
super(Local.getString("Undo"));
setEnabled(false);
putValue(
Action.SMALL_ICON,
new ImageIcon(cl.getResource("/htmleditor/icons/undo16.png")));
putValue(
Action.ACCELERATOR_KEY,
KeyStroke.getKeyStroke(KeyEvent.VK_Z, KeyEvent.CTRL_MASK));
}
示例13: InsertTableCellAction
import net.sf.memoranda.ui.htmleditor.util.Local; //导入依赖的package包/类
InsertTableCellAction() {
super(Local.getString("Insert table cell"));
this.putValue(
Action.ACCELERATOR_KEY,
KeyStroke.getKeyStroke(
KeyEvent.VK_ENTER,
KeyEvent.CTRL_MASK + KeyEvent.SHIFT_MASK));
}
示例14: RedoAction
import net.sf.memoranda.ui.htmleditor.util.Local; //导入依赖的package包/类
public RedoAction() {
super(Local.getString("Redo"));
setEnabled(false);
putValue(
Action.SMALL_ICON,
new ImageIcon(cl.getResource("/htmleditor/icons/redo16.png")));
putValue(
Action.ACCELERATOR_KEY,
KeyStroke.getKeyStroke(
KeyEvent.VK_Z,
KeyEvent.CTRL_MASK + KeyEvent.SHIFT_MASK));
}
示例15: InsertTableCellAction
import net.sf.memoranda.ui.htmleditor.util.Local; //导入依赖的package包/类
InsertTableCellAction() {
super(Local.getString("Insert table cell"));
this.putValue(
Action.ACCELERATOR_KEY,
KeyStroke.getKeyStroke(
KeyEvent.VK_ENTER,
KeyEvent.CTRL_MASK + KeyEvent.SHIFT_MASK));
}