本文整理了Java中javax.swing.JComboBox.getToolTipText()
方法的一些代码示例,展示了JComboBox.getToolTipText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JComboBox.getToolTipText()
方法的具体详情如下:
包路径:javax.swing.JComboBox
类名称:JComboBox
方法名:getToolTipText
暂无
代码示例来源:origin: org.apache.jmeter/jorphan
/**
* Returns the tooltip string that has been set with setToolTipText
* @return the text of the tool tip
*/
@Override
public String getToolTipText() {
if (choiceList == null){ // Necessary to avoid NPE when testing serialisation
return null;
}
return choiceList.getToolTipText();
}
代码示例来源:origin: org.tentackle/tentackle-swing
@Override
public String getToolTipText() {
return getTooltipDisplay() == null ? super.getToolTipText() : null;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
private void updateToolTipTextForChildren()
{
Component[] children= comboBox.getComponents();
for (int i= 0; i < children.length; ++i)
{
if (children[i] instanceof JComponent)
{
((JComponent) children[i]).setToolTipText(
comboBox.getToolTipText());
}
}
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-swing-action
/**
* @param component le select box où rattacher l'action
* @param action action
* @param configurationResolver initializer
*/
protected void finalizeNewAction(JComboBox component, MyAbstractAction action, ActionConfigurationResolver<?, ?> configurationResolver) {
if (configurationResolver == null) {
action.putValue(Action.ACTION_COMMAND_KEY, component.getName());
action.putValue(Action.SHORT_DESCRIPTION, component.getToolTipText());
//result.putValue("selectedIndex", component.getSelectedIndex());
}
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-swing-action
@Override
protected SelectActionConfig applyConfiguration0(JComboBox component, MyAbstractAction action) {
SelectActionConfig anno = resolveConfiguration(action);
if (anno == null) {
return null;
}
// inject les données
if (!anno.name().isEmpty()) {
action.putValue(Action.NAME, _(anno.name()));
}
if (!anno.shortDescription().isEmpty()) {
action.putValue(Action.SHORT_DESCRIPTION, _(anno.shortDescription()));
} else {
action.putValue(Action.SHORT_DESCRIPTION, _(component.getToolTipText()));
}
action.putValue("selectedIndex", anno.selectedIndex());
//TODO Convert it from String action.putValue(Action.ACCELERATOR_KEY, anno.accelerator());
action.setEnabled(anno.enabled());
return anno;
}
}
代码示例来源:origin: org.tentackle/tentackle-swing
@Override
public void focusGained (FocusEvent e) {
if (!e.isTemporary()) {
Component opposite = e.getOppositeComponent();
boolean wasEnter = false;
if (opposite instanceof FormComponent) {
focusGainedFromTransfer = ((FormComponent)opposite).wasTransferFocus();
focusGainedFromTransferBackward = ((FormComponent)opposite).wasTransferFocusBackward();
wasEnter = ((FormComponent)opposite).wasTransferFocusByEnter();
}
transferFocusDone = false;
transferFocusBackwardDone = false;
transferFocusByEnter = false;
if (isAutoUpdate()) {
fireValueChanged();
}
formWrapWindow = null;
showTooltip(super.getToolTipText());
if (isEditable() && this instanceof FormFieldComboBox) {
AbstractFormField field = ((FormFieldComboBox)this).getEditorField();
if (field.isStartEditLeftmost() || wasEnter || focusGainedFromTransferBackward) {
field.setCaretLeft();
}
else if (focusGainedFromTransfer) {
field.setCaretRight();
}
}
oldValueShown = getValueShown();
}
}
内容来源于网络,如有侵权,请联系作者删除!