本文整理了Java中javax.swing.JLabel.getAccessibleContext()
方法的一些代码示例,展示了JLabel.getAccessibleContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JLabel.getAccessibleContext()
方法的具体详情如下:
包路径:javax.swing.JLabel
类名称:JLabel
方法名:getAccessibleContext
暂无
代码示例来源:origin: magefree/mage
);
lblFastConnect.getAccessibleContext().setAccessibleName("Fast connect to:");
代码示例来源:origin: magefree/mage
lblPlayer01.setVerifyInputWhenFocusTarget(false);
pnlLeft.add(lblPlayer01);
lblPlayer01.getAccessibleContext().setAccessibleName("");
代码示例来源:origin: magefree/mage
);
cardCountLabel.getAccessibleContext().setAccessibleName("cardCountLabel");
cardCount.getAccessibleContext().setAccessibleName("cardCount");
代码示例来源:origin: magefree/mage
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
guiSizeBasic.add(labelDialogFont, gridBagConstraints);
labelDialogFont.getAccessibleContext().setAccessibleDescription("<HTML>The size of the font used to display messages or menus.");
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
guiSizeGame.add(labelStackWidth, gridBagConstraints);
labelStackWidth.getAccessibleContext().setAccessibleDescription("<HTML>The stack width in relation to the hand area width");
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
guiSizeGame.add(labelGameFeedback, gridBagConstraints);
labelGameFeedback.getAccessibleContext().setAccessibleName("");
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
private static String getInformacaoExtra(JLabel label)
{
if (!label.getText().isEmpty()) {
return "texto: " + label.getText();
}
return getInformacaoExtra(label.getAccessibleContext());
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-beans
private void initLabels() {
JLabel typeLabel = getSubjectElementLabel();
Mnemonics.setLocalizedText(typeLabel,NbBundle.getMessage(
ObserversPanel.class, "LBL_EventType") ); // NOI18N
typeLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSN_EventType")); // NOI18N
typeLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSD_EventType")); // NOI18N
JLabel qualifiersLabel= getSubjectBindingsLabel();
Mnemonics.setLocalizedText(qualifiersLabel,NbBundle.getMessage(
ObserversPanel.class, "LBL_EventQualifiers") ); // NOI18N
qualifiersLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSN_EventQualifiers")); // NOI18N
qualifiersLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSD_EventQualifiers")); // NOI18N
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-beans
private void initLabels() {
JLabel typeLabel = getSubjectElementLabel();
Mnemonics.setLocalizedText(typeLabel,NbBundle.getMessage(
ObserversPanel.class, "LBL_ObservedEventType") ); // NOI18N
typeLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSN_ObservedEventType")); // NOI18N
typeLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSD_ObservedEventType")); // NOI18N
JLabel qualifiersLabel= getSubjectBindingsLabel();
Mnemonics.setLocalizedText(qualifiersLabel,NbBundle.getMessage(
ObserversPanel.class, "LBL_ObservedEventQualifiers") ); // NOI18N
qualifiersLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSN_ObservedEventQualifiers")); // NOI18N
qualifiersLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSD_ObservedEventQualifiers")); // NOI18N
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-beans
Mnemonics.setLocalizedText(elementLabel,NbBundle.getMessage(
ObserversPanel.class, "LBL_InterceptedElement") ); // NOI18N
elementLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSN_InterceptedElement")); // NOI18N
elementLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSD_InterceptedElement")); // NOI18N
Mnemonics.setLocalizedText(iBindingsLabel,NbBundle.getMessage(
ObserversPanel.class, "LBL_InterceptorBindings") ); // NOI18N
iBindingsLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSN_InterceptorBindings")); // NOI18N
iBindingsLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSD_InterceptorBindings")); // NOI18N
Mnemonics.setLocalizedText(selectedIBindgings,NbBundle.getMessage(
ObserversPanel.class, "LBL_SelectedInterceptorBindings") ); // NOI18N
selectedIBindgings.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSN_SelectedInterceptorBindings")); // NOI18N
selectedIBindgings.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSD_SelectedInterceptorBindings")); // NOI18N
Mnemonics.setLocalizedText(selectedStereotypes,NbBundle.getMessage(
ObserversPanel.class, "LBL_IStereotypes") ); // NOI18N
selectedStereotypes.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSN_IStereotypes")); // NOI18N
selectedStereotypes.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSD_IStereotypes")); // NOI18N
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-beans
Mnemonics.setLocalizedText(elementLabel,NbBundle.getMessage(
ObserversPanel.class, "LBL_DecoratedElement") ); // NOI18N
elementLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSN_DecoratedElement")); // NOI18N
elementLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSD_DecoratedElement")); // NOI18N
Mnemonics.setLocalizedText(qualifiers,NbBundle.getMessage(
ObserversPanel.class, "LBL_DecoratorQualifiers") ); // NOI18N
qualifiers.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSN_DecoratorQualifiers")); // NOI18N
qualifiers.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSD_DecoratorQualifiers")); // NOI18N
Mnemonics.setLocalizedText(selectedQualifiers,NbBundle.getMessage(
ObserversPanel.class, "LBL_SelectedDecoratorQualifiers") ); // NOI18N
selectedQualifiers.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSN_SelectedDecoratorQualifiers")); // NOI18N
selectedQualifiers.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSD_SelectedDecoratorQualifiers")); // NOI18N
Mnemonics.setLocalizedText(scopeLabel,NbBundle.getMessage(
ObserversPanel.class, "LBL_SelectedDelegateType") ); // NOI18N
scopeLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSN_SelectedDelegateType")); // NOI18N
scopeLabel.getAccessibleContext().setAccessibleName(NbBundle.getMessage(
ObserversPanel.class, "ACSD_SelectedDelegateType")); // NOI18N
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-project-jsf
gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 0);
add(jLabel1, gridBagConstraints);
jLabel1.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(BrowseFolders.class, "ACSN_BrowseFolders_jLabel1"));
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd
gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 0);
add(jLabel1, gridBagConstraints);
jLabel1.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(BrowseFolders.class, "ACSN_BrowseFolders_jLabel1")); // NOI18N
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards
private void initAccessibility() {
this.getAccessibleContext().setAccessibleDescription(getMessage("ACS_WizardTypePanel"));
custom.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_Custom"));
newFile.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_NewFile"));
statik.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_Static"));
dynamic.getAccessibleContext().setAccessibleDescription(getMessage("ACS_CTL_Dynamic"));
numberOfStepsTxt.getAccessibleContext().setAccessibleDescription(getMessage("ACS_LBL_NumberOfSteps"));
}
代码示例来源:origin: com.github.stephenc.monte/monte-screen-recorder
@Override
public void mouseMoved(MouseEvent e) {
Point point = e.getPoint();
AccessibleText at = (AccessibleText) label.getAccessibleContext();
int pos = at.getIndexAtPoint(point);
AttributeSet as = at.getCharacterAttribute(pos);
if (label.isEnabled() && as.getAttribute(HTML.Tag.A) != null) {
label.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
} else {
label.setCursor(Cursor.getDefaultCursor());
}
}
}
代码示例来源:origin: ru.sbtqa/monte-media
@Override
public void mouseMoved(MouseEvent e) {
Point point = e.getPoint();
AccessibleText at = (AccessibleText) label.getAccessibleContext();
int pos = at.getIndexAtPoint(point);
AttributeSet as = at.getCharacterAttribute(pos);
if (label.isEnabled() && as.getAttribute(A) != null) {
label.setCursor(getPredefinedCursor(HAND_CURSOR));
} else {
label.setCursor(getDefaultCursor());
}
}
}
代码示例来源:origin: ru.sbtqa/monte-media
@Override
public void mouseClicked(MouseEvent e) {
Point point = e.getPoint();
AccessibleText at = (AccessibleText) label.getAccessibleContext();
int pos = at.getIndexAtPoint(point);
AttributeSet as = at.getCharacterAttribute(pos);
if (label.isEnabled() && as.getAttribute(A) != null) {
label.setCursor(getPredefinedCursor(HAND_CURSOR));
SimpleAttributeSet attr = (SimpleAttributeSet) as.getAttribute(A);
String href = (String) attr.getAttribute(HREF);
fireActionPerformed(new ActionEvent(label, ACTION_PERFORMED, href));
} else {
label.setCursor(getDefaultCursor());
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-dataconnectivity
public BeanColumnPanel makeBeanColumn( DesignContext context, DesignBean rowSetBean, AbstractButton columnButton ) {
BeanColumnPanel jp = new BeanColumnPanel(context, rowSetBean) ;
JLabel xxLabel = new JLabel(context.getDisplayName()) ;
xxLabel.getAccessibleContext().setAccessibleDescription(xxLabel.getText() );
xxLabel.getAccessibleContext().setAccessibleName(xxLabel.getText());
jp.add(xxLabel) ;
JComponent xxField = null ;
if ( rowSetBean != null ) {
xxField = new JLabel(rowSetBean.getInstanceName()) ;
xxField.getAccessibleContext().setAccessibleDescription( rowSetBean.getInstanceName() );
xxField.getAccessibleContext().setAccessibleName( rowSetBean.getInstanceName() );
} else {
String defaultName = getRowSetNameForContext(context, null) ;
JTextField tf = new JTextField(defaultName) ;
tf.setColumns(15) ;
// PlainDocument nameDoc = new PlainDocument() ;
tf.getDocument().addDocumentListener( new DocListener( columnButton, jp) ) ;
// tf.setDocument(nameDoc) ;
xxLabel.setLabelFor(xxField);
addToTabOrder( tf ) ;
// either set the tooltip or the a11y description
tf.setName(context.getDisplayName());
tf.getAccessibleContext().setAccessibleDescription(context.getDisplayName());
xxField = (JComponent)tf ;
jp.rowsetName = tf ;
}
jp.add(xxField) ;
return jp ;
}
代码示例来源:origin: com.github.stephenc.monte/monte-screen-recorder
@Override
public void mouseClicked(MouseEvent e) {
Point point = e.getPoint();
AccessibleText at = (AccessibleText) label.getAccessibleContext();
int pos = at.getIndexAtPoint(point);
AttributeSet as = at.getCharacterAttribute(pos);
if (label.isEnabled() && as.getAttribute(HTML.Tag.A) != null) {
label.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
SimpleAttributeSet attr=(SimpleAttributeSet)as.getAttribute(HTML.Tag.A);
String href=(String)attr.getAttribute(HTML.Attribute.HREF);
fireActionPerformed(
new ActionEvent(label,ActionEvent.ACTION_PERFORMED,href));
} else {
label.setCursor(Cursor.getDefaultCursor());
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-dataconnectivity
);
message.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(DataSourceCreationNotSupported.class, "MSG_DataSourceNotSupported")); // NOI18N
message.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(DataSourceCreationNotSupported.class, "ACSD_WaitForUpdate")); // NOI18N
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-profiler
public JavaPlatform selectPlatformForCalibration() {
java.util.List<JavaPlatform> platforms = JavaPlatform.getPlatforms();
if (platforms.size() == 0) {
ProfilerDialogs.displayError(Bundle.JavaPlatformSelector_NoSupportedPlatformMsg());
JavaPlatform.showCustomizer();
return null;
}
noteLabel.setText(Bundle.JavaPlatformSelector_SelectPlatformCalibrateMsg());
noteLabel.getAccessibleContext().setAccessibleName(Bundle.JavaPlatformSelector_SelectPlatformCalibrateMsg());
list.getAccessibleContext().setAccessibleDescription(Bundle.JavaPlatformSelector_SelectPlatformCalibrateMsg());
list.setModel(new JPListModel(platforms));
alwaysCheckBox.setVisible(false);
DialogDescriptor dd = new DialogDescriptor(this, Bundle.JavaPlatformSelector_SelectPlatformCalibrateDialogCaption(), true,
new Object[] { okButton, DialogDescriptor.CANCEL_OPTION }, okButton,
DialogDescriptor.BOTTOM_ALIGN, null, null);
list.setSelectedIndex(0);
validateOKButton();
Dialog selectDialog = DialogDisplayer.getDefault().createDialog(dd);
selectDialog.getAccessibleContext().setAccessibleDescription(Bundle.JavaPlatformSelector_SelectPlatformCalibrateDialogCaption());
selectDialog.setVisible(true);
if (dd.getValue() == okButton) {
int idx = list.getSelectedIndex();
return (JavaPlatform) platforms.get(idx);
}
return null;
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-profiler
noteLabel.getAccessibleContext().setAccessibleName(
Bundle.JavaPlatformSelector_CannotUsePlatform() +
Bundle.JavaPlatformSelector_SelectPlatformProfileMsg());
内容来源于网络,如有侵权,请联系作者删除!