本文整理了Java中javax.swing.JMenuItem.setVerticalTextPosition()
方法的一些代码示例,展示了JMenuItem.setVerticalTextPosition()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenuItem.setVerticalTextPosition()
方法的具体详情如下:
包路径:javax.swing.JMenuItem
类名称:JMenuItem
方法名:setVerticalTextPosition
暂无
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction
@Override
public void setVerticalTextPosition(int aValue) {
super.setVerticalTextPosition(aValue);
}
代码示例来源:origin: org.appdapter/org.appdapter.lib.gui
/**
* Factory method which creates the <code>JMenuItem</code> for
* <code>Actions</code> added to the <code>JPopupMenu</code>.
*
* @param a the <code>Action</code> for the menu item to be added
* @return the new menu item
* @see Action
*
* @since 1.3
*/
protected JMenuItem createActionComponent(Action a, Object ctx) {
JMenuItem mi = new SafeJMenuItem(ctx, true) {
protected PropertyChangeListener createActionPropertyChangeListener(Action a) {
PropertyChangeListener pcl = createActionChangeListener(this);
if (pcl == null) {
pcl = super.createActionPropertyChangeListener(a);
}
return pcl;
}
};
mi.setHorizontalTextPosition(JButton.TRAILING);
mi.setVerticalTextPosition(JButton.CENTER);
return mi;
}
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
@Override
public JMenuItem insert(Action a, int pos) {
if(pos < 0) {
throw new IllegalArgumentException("index less than zero.");
}
ensurePopupMenuCreated();
JMenuItem mi = new JMenuItem(a);
mi.setHorizontalTextPosition(JButton.TRAILING);
mi.setVerticalTextPosition(JButton.CENTER);
popupMenu.insert(mi, pos);
return mi;
}
代码示例来源:origin: org.appdapter/org.appdapter.lib.gui
/**
* Appends a component to the end of this menu.
* Returns the component added.
*
* @param c the <code>Component</code> to add
* @return the <code>Component</code> added
*/
@Override
protected JMenuItem createActionComponent(Action a) {
JMenuItem mi = new SafeJMenuItem(userObject, true) {
@Override
protected PropertyChangeListener createActionPropertyChangeListener(Action a) {
PropertyChangeListener pcl = createActionChangeListener(this);
if (pcl == null) {
pcl = super.createActionPropertyChangeListener(a);
}
return pcl;
}
};
mi.setHorizontalTextPosition(SwingConstants.TRAILING);
mi.setVerticalTextPosition(SwingConstants.CENTER);
return mi;
}
内容来源于网络,如有侵权,请联系作者删除!