当前位置: 首页>>代码示例>>Java>>正文


Java JLabel.setCursor方法代码示例

本文整理汇总了Java中javax.swing.JLabel.setCursor方法的典型用法代码示例。如果您正苦于以下问题:Java JLabel.setCursor方法的具体用法?Java JLabel.setCursor怎么用?Java JLabel.setCursor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.JLabel的用法示例。


在下文中一共展示了JLabel.setCursor方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createRestartNotificationDetails

import javax.swing.JLabel; //导入方法依赖的package包/类
private JComponent createRestartNotificationDetails() {
    JPanel res = new JPanel( new BorderLayout( 10, 10) );
    res.setOpaque( false );
    JLabel lbl = new JLabel( NbBundle.getMessage( LafPanel.class, "Descr_Restart") ); //NOI18N
    lbl.setCursor( Cursor.getPredefinedCursor( Cursor.HAND_CURSOR ) );
    res.add( lbl, BorderLayout.CENTER );
    final JCheckBox checkEditorColors = new JCheckBox( NbBundle.getMessage( LafPanel.class, "Hint_ChangeEditorColors" ) ); //NOI18N
    if( isChangeEditorColorsPossible() ) {
        checkEditorColors.setSelected( true );
        checkEditorColors.setOpaque( false );
        res.add( checkEditorColors, BorderLayout.SOUTH );
    }
    lbl.addMouseListener( new MouseAdapter() {
        @Override
        public void mouseClicked( MouseEvent e ) {
            if( null != restartNotification ) {
                restartNotification.clear();
                restartNotification = null;
            }
            if( checkEditorColors.isSelected() ) {
                switchEditorColorsProfile();
            }
            LifecycleManager.getDefault().markForRestart();
            LifecycleManager.getDefault().exit();
        }
    });
    return res;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:29,代码来源:LafPanel.java

示例2: setupGui

import javax.swing.JLabel; //导入方法依赖的package包/类
protected void setupGui()
{
	final JLabel canvasUrlLabel = new JLabel(getString("label.canvasurl"));
	final JLabel clientIdLabel = new JLabel(getString("label.clientid"));
	final JLabel secretLabel = new JLabel(getString("label.secret"));
	preamble = new JLabel(getString("preamble", CANVAS_SIGNUP_URL));
	preamble.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
	preamble.addMouseListener(this);

	canvasUrl = new JTextField(20);
	clientId = new JTextField(20);
	secret = new JPasswordField(20);
	bypassLogon = new JCheckBox();
	bypassLogon.setText(getString("label.bypasslogon"));

	final LayoutManager layout = new MigLayout("wrap", "[fill][fill,grow]");
	setLayout(layout);

	setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));

	add(preamble, "span 2, gapbottom 20");
	add(canvasUrlLabel);
	add(canvasUrl);
	add(clientIdLabel);
	add(clientId);
	add(secretLabel);
	add(secret);
	add(bypassLogon, "span 2");

	validate();
}
 
开发者ID:equella,项目名称:Equella,代码行数:32,代码来源:CanvasSettingsPanel.java

示例3: addURL

import javax.swing.JLabel; //导入方法依赖的package包/类
public void addURL(String content) {
	JLabel label = new JLabel("<html>"+content+"</html>");
	label.setCursor(new Cursor(Cursor.HAND_CURSOR));
	label.setToolTipText(content);
	addMouseHandler(label);
	pan.add(label);
}
 
开发者ID:mvetsch,项目名称:JWT4B,代码行数:8,代码来源:JLabelLink.java

示例4: createLabel

import javax.swing.JLabel; //导入方法依赖的package包/类
private void createLabel() {
    discardLabel();
    label = new JLabel();
    label.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    label.addMouseListener(mouseListener);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:StatusLineComponent.java

示例5: createExtraLabel

import javax.swing.JLabel; //导入方法依赖的package包/类
private void createExtraLabel() {
    discardExtraLabel();
    extraLabel = new JLabel();
    extraLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    extraLabel.addMouseListener(mouseListener);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:StatusLineComponent.java

示例6: deselectallsectionbuttons

import javax.swing.JLabel; //导入方法依赖的package包/类
private static void deselectallsectionbuttons(){
	
	for(Component comp : panelSections.getComponents()){
		
		if(comp instanceof JLabel){
			
			JLabel lblcomp=(JLabel) comp;
			
			lblcomp.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
			lblcomp.setForeground(new Color(0,110,198,255));
			
		}
		
	}
	
}
 
开发者ID:davovoid,项目名称:faitic-checker,代码行数:17,代码来源:SubjectsGUI.java

示例7: selectsectionbutton

import javax.swing.JLabel; //导入方法依赖的package包/类
private static void selectsectionbutton(Component selcomp){
	
	deselectallsectionbuttons();
	
	for(Component comp : panelSections.getComponents()){
		
		if(comp instanceof JLabel && selcomp.equals(comp)){
			
			JLabel lblcomp=(JLabel) comp;
			
			lblcomp.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
			lblcomp.setForeground(SystemColor.windowText);
			
		}
		
	}
	
	panelOptions.setVisible(selcomp.equals(lblFiles) && online && selectedSubject>=0);
	
}
 
开发者ID:davovoid,项目名称:faitic-checker,代码行数:21,代码来源:SubjectsGUI.java

示例8: setHandCursor

import javax.swing.JLabel; //导入方法依赖的package包/类
/**
 * Sets the hand cursor.
 *
 * @param component
 * @param label
 */
private void setHandCursor(Component component, JLabel label) {
    component.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    label.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
}
 
开发者ID:IngSW-unipv,项目名称:Progetto-B,代码行数:11,代码来源:LabelMapListener.java

示例9: setDefaultCursor

import javax.swing.JLabel; //导入方法依赖的package包/类
/**
 * Sets the default cursor.
 *
 * @param component
 * @param label
 */
private void setDefaultCursor(Component component, JLabel label) {
    component.setCursor(Cursor.getDefaultCursor());
    label.setCursor(Cursor.getDefaultCursor());
}
 
开发者ID:IngSW-unipv,项目名称:Progetto-B,代码行数:11,代码来源:LabelMapListener.java


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