當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。