當前位置: 首頁>>代碼示例>>Java>>正文


Java MainGui.getLinkLabelListener方法代碼示例

本文整理匯總了Java中chatty.gui.MainGui.getLinkLabelListener方法的典型用法代碼示例。如果您正苦於以下問題:Java MainGui.getLinkLabelListener方法的具體用法?Java MainGui.getLinkLabelListener怎麽用?Java MainGui.getLinkLabelListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在chatty.gui.MainGui的用法示例。


在下文中一共展示了MainGui.getLinkLabelListener方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: TokenDialog

import chatty.gui.MainGui; //導入方法依賴的package包/類
public TokenDialog(MainGui owner) {
    super(owner,"Login configuration",true);
    this.setResizable(false);
   
    this.setLayout(new GridBagLayout());
    
    accessLabel = new LinkLabel("Access [help:login (?)]:", owner.getLinkLabelListener());
    
    add(nameLabel, makeGridBagConstraints(0,0,1,1,GridBagConstraints.WEST));
    add(name, makeGridBagConstraints(0,1,2,1,GridBagConstraints.CENTER,new Insets(0,5,5,5)));
    
    add(accessLabel, makeGridBagConstraints(0,2,1,1,GridBagConstraints.WEST));
    add(access, makeGridBagConstraints(0,3,2,1,GridBagConstraints.CENTER,new Insets(0,5,5,5)));
    
    add(tokenInfo, makeGridBagConstraints(0,4,2,1,GridBagConstraints.WEST));
    add(deleteToken, makeGridBagConstraints(0,6,1,1,GridBagConstraints.WEST));
    add(requestToken, makeGridBagConstraints(0,6,2,1,GridBagConstraints.CENTER));
    add(verifyToken, makeGridBagConstraints(1,6,1,1,GridBagConstraints.WEST));
    add(done, makeGridBagConstraints(1,7,1,1,GridBagConstraints.EAST));
    
    ActionListener actionListener = owner.getActionListener();
    requestToken.addActionListener(actionListener);
    deleteToken.addActionListener(actionListener);
    verifyToken.addActionListener(actionListener);
    done.addActionListener(actionListener);

    pack();
}
 
開發者ID:pokemane,項目名稱:TwitchChatClient,代碼行數:29,代碼來源:TokenDialog.java

示例2: TokenGetDialog

import chatty.gui.MainGui; //導入方法依賴的package包/類
public TokenGetDialog(MainGui owner) {
    super(owner,"Get login data",true);
    this.setResizable(false);
    this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    this.addWindowListener(owner.getWindowListener());
    
    info = new LinkLabel(INFO, owner.getLinkLabelListener());
    
    setLayout(new GridBagLayout());
    
    GridBagConstraints gbc;
    add(info,makeGridBagConstraints(0,0,2,1,GridBagConstraints.CENTER));
    
    // Default selected options
    includeReadUserAccess.setSelected(true);
    includeEditorAccess.setSelected(true);
    includeCommercialAccess.setSelected(true);
    includeShowSubsAccess.setSelected(true);
    includeFollowAccess.setSelected(true);
    
    // Options
    gbc = makeGridBagConstraints(0, 1, 2, 1, GridBagConstraints.WEST);
    gbc.insets = new Insets(5,5,0,5);
    includeReadUserAccess.setToolTipText("To get notified when streams you "
            + "follow go online.");
    add(includeReadUserAccess, gbc);
    
    gbc = makeGridBagConstraints(0, 2, 2, 1, GridBagConstraints.WEST);
    gbc.insets = new Insets(0,5,0,5);
    includeEditorAccess.setToolTipText("To be able to edit your channel's title and game.");
    add(includeEditorAccess,gbc);
    
    gbc = makeGridBagConstraints(0,3,2,1,GridBagConstraints.WEST);
    gbc.insets = new Insets(0,5,0,5);
    includeCommercialAccess.setToolTipText("To be able to run commercials on your stream.");
    add(includeCommercialAccess,gbc);
    
    gbc = makeGridBagConstraints(0,4,2,1,GridBagConstraints.WEST);
    gbc.insets = new Insets(0,5,0,5);
    includeShowSubsAccess.setToolTipText("To be able to show the list of your subscribers.");
    add(includeShowSubsAccess,gbc);
    
    gbc = makeGridBagConstraints(0,5,2,1,GridBagConstraints.WEST);
    gbc.insets = new Insets(0,5,5,5);
    includeFollowAccess.setToolTipText("To be able to follow channels.");
    add(includeFollowAccess,gbc);
    
    // URL Display and Buttons
    gbc = makeGridBagConstraints(0,6,2,1,GridBagConstraints.CENTER);
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 1;
    urlField.setEditable(false);
    add(urlField, gbc);
    gbc = makeGridBagConstraints(0,7,1,1,GridBagConstraints.EAST);
    gbc.insets = new Insets(0,5,10,5);
    add(copyUrl,gbc);
    gbc = makeGridBagConstraints(1,7,1,1,GridBagConstraints.EAST);
    gbc.insets = new Insets(0,0,10,5);
    add(openUrl,gbc);
    
    // Status and Close Button
    add(status,makeGridBagConstraints(0,8,2,1,GridBagConstraints.CENTER));
    add(close,makeGridBagConstraints(1,9,1,1,GridBagConstraints.EAST));
    
    openUrl.addActionListener(this);
    copyUrl.addActionListener(this);
    close.addActionListener(owner.getActionListener());
    
    includeEditorAccess.addItemListener(this);
    includeCommercialAccess.addItemListener(this);
    includeReadUserAccess.addItemListener(this);
    includeShowSubsAccess.addItemListener(this);
    includeFollowAccess.addItemListener(this);
    
    reset();
    updateUrl();
    
    pack();
}
 
開發者ID:chatty,項目名稱:chatty,代碼行數:80,代碼來源:TokenGetDialog.java

示例3: AdminDialog

import chatty.gui.MainGui; //導入方法依賴的package包/類
public AdminDialog(MainGui main, TwitchApi api) {
    super(main);
    setTitle("Channel Admin - No Channel");
    this.main = main;
    this.api = api;
    setResizable(false);
    addWindowListener(new WindowClosingListener());
    setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);

    // Special objects
    infoText = new LinkLabel("Test",main.getLinkLabelListener());
    
    statusPanel = new StatusPanel(this, main, api);
    commercialPanel = new CommercialPanel(main);
    
    setLayout(new GridBagLayout());
    
    GridBagConstraints gbc;
    
    // Add to tab pane
    tabs = new JTabbedPane();
    tabs.addChangeListener(new ChangeListener() {

        @Override
        public void stateChanged(ChangeEvent e) {
            updateInfoText();
        }
    });
    tabs.addTab(Language.getString("admin.tab.status"), statusPanel);
    tabs.addTab(Language.getString("admin.tab.commercial"), commercialPanel);
    gbc = makeGbc(0,0,2,1);
    gbc.insets = new Insets(0,0,0,0);
    add(tabs, gbc);
    
    
    gbc = makeGbc(0,1,1,1);
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 1;
    add(infoText, gbc);
    
    gbc = makeGbc(1,1,1,1);
    //gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.anchor = GridBagConstraints.EAST;
    close.setMnemonic(KeyEvent.VK_C);
    add(close,gbc);
    
    
    close.addActionListener(actionListener);
    
    
    
    
    finishDialog();
    
    startUpdateTimer();
}
 
開發者ID:chatty,項目名稱:chatty,代碼行數:58,代碼來源:AdminDialog.java

示例4: TokenDialog

import chatty.gui.MainGui; //導入方法依賴的package包/類
public TokenDialog(MainGui owner) {
    super(owner,"Login configuration",true);
    this.setResizable(false);
   
    this.setLayout(new GridBagLayout());
    
    accessLabel = new LinkLabel("Access [help:login (?)]:", owner.getLinkLabelListener());
    //tokenInfo = new JLabel();
    tokenInfo = new LinkLabel("", owner.getLinkLabelListener());
    foreignTokenInfo = new LinkLabel("<html><body style='width:170px'>"
                + "Login data set externally with -token parameter.", owner.getLinkLabelListener());
    foreignTokenInfo.setVisible(false);
    
    GridBagConstraints gbc;
    
    add(nameLabel, makeGridBagConstraints(0,0,1,1,GridBagConstraints.WEST));
    add(name, makeGridBagConstraints(0,1,2,1,GridBagConstraints.CENTER,new Insets(0,5,5,5)));
    
    add(accessLabel, makeGridBagConstraints(0,2,1,1,GridBagConstraints.WEST));
    
    gbc = makeGridBagConstraints(0,3,2,1,GridBagConstraints.CENTER,new Insets(0,5,5,5));
    add(access, gbc);
    
    gbc = makeGridBagConstraints(0,4,2,1,GridBagConstraints.WEST);
    add(tokenInfo, gbc);
    
    gbc = makeGridBagConstraints(0,5,2,1,GridBagConstraints.WEST);
    add(foreignTokenInfo, gbc);
    
    gbc = makeGridBagConstraints(0,6,1,1,GridBagConstraints.WEST);
    gbc.fill = GridBagConstraints.HORIZONTAL;
    add(deleteToken, gbc);
    
    gbc = makeGridBagConstraints(0,6,2,1,GridBagConstraints.CENTER);
    add(requestToken, gbc);
    
    gbc = makeGridBagConstraints(1,6,1,1,GridBagConstraints.WEST);
    gbc.fill = GridBagConstraints.HORIZONTAL;
    add(verifyToken, gbc);
    
    gbc = makeGridBagConstraints(1,7,1,1,GridBagConstraints.EAST);
    add(done, gbc);
    
    ActionListener actionListener = owner.getActionListener();
    requestToken.addActionListener(actionListener);
    deleteToken.addActionListener(actionListener);
    verifyToken.addActionListener(actionListener);
    done.addActionListener(actionListener);

    pack();
}
 
開發者ID:chatty,項目名稱:chatty,代碼行數:52,代碼來源:TokenDialog.java

示例5: TokenGetDialog

import chatty.gui.MainGui; //導入方法依賴的package包/類
public TokenGetDialog(MainGui owner) {
    super(owner,"Get login data",true);
    this.setResizable(false);
    this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    this.addWindowListener(owner.getWindowListener());
    
    info = new LinkLabel(INFO, owner.getLinkLabelListener());
    
    setLayout(new GridBagLayout());
    
    GridBagConstraints gbc;
    add(info,makeGridBagConstraints(0,0,2,1,GridBagConstraints.CENTER));
    
    // Default selected options
    includeReadUserAccess.setSelected(true);
    includeEditorAccess.setSelected(true);
    includeCommercialAccess.setSelected(true);
    includeShowSubsAccess.setSelected(true);
    
    // Options
    gbc = makeGridBagConstraints(0, 1, 2, 1, GridBagConstraints.WEST);
    gbc.insets = new Insets(5,5,0,5);
    includeReadUserAccess.setToolTipText("To get notified when streams you "
            + "follow go online.");
    add(includeReadUserAccess, gbc);
    gbc = makeGridBagConstraints(0, 2, 2, 1, GridBagConstraints.WEST);
    gbc.insets = new Insets(0,5,0,5);
    includeEditorAccess.setToolTipText("To be able to edit your channel's title and game.");
    add(includeEditorAccess,gbc);
    gbc = makeGridBagConstraints(0,3,2,1,GridBagConstraints.WEST);
    gbc.insets = new Insets(0,5,0,5);
    includeCommercialAccess.setToolTipText("To be able to run commercials on your stream.");
    add(includeCommercialAccess,gbc);
    gbc = makeGridBagConstraints(0,4,2,1,GridBagConstraints.WEST);
    gbc.insets = new Insets(0,5,5,5);
    includeShowSubsAccess.setToolTipText("To be able to show the list of your subscribers.");
    add(includeShowSubsAccess,gbc);
    
    // URL Display and Buttons
    gbc = makeGridBagConstraints(0,5,2,1,GridBagConstraints.CENTER);
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 1;
    urlField.setEditable(false);
    add(urlField, gbc);
    gbc = makeGridBagConstraints(0,6,1,1,GridBagConstraints.EAST);
    gbc.insets = new Insets(0,5,10,5);
    add(copyUrl,gbc);
    gbc = makeGridBagConstraints(1,6,1,1,GridBagConstraints.EAST);
    gbc.insets = new Insets(0,0,10,5);
    add(openUrl,gbc);
    
    // Status and Close Button
    add(status,makeGridBagConstraints(0,7,2,1,GridBagConstraints.CENTER));
    add(close,makeGridBagConstraints(1,8,1,1,GridBagConstraints.EAST));
    
    openUrl.addActionListener(this);
    copyUrl.addActionListener(this);
    close.addActionListener(owner.getActionListener());
    
    includeEditorAccess.addItemListener(this);
    includeCommercialAccess.addItemListener(this);
    includeReadUserAccess.addItemListener(this);
    includeShowSubsAccess.addItemListener(this);
    
    reset();
    updateUrl();
    
    pack();
}
 
開發者ID:partouf,項目名稱:Chatty-Twitch-Client,代碼行數:70,代碼來源:TokenGetDialog.java

示例6: TokenDialog

import chatty.gui.MainGui; //導入方法依賴的package包/類
public TokenDialog(MainGui owner) {
    super(owner,"Login configuration",true);
    this.setResizable(false);
   
    this.setLayout(new GridBagLayout());
    
    accessLabel = new LinkLabel("Access [help:login (?)]:", owner.getLinkLabelListener());
    //tokenInfo = new JLabel();
    tokenInfo = new LinkLabel("", owner.getLinkLabelListener());
    
    GridBagConstraints gbc;
    
    add(nameLabel, makeGridBagConstraints(0,0,1,1,GridBagConstraints.WEST));
    add(name, makeGridBagConstraints(0,1,2,1,GridBagConstraints.CENTER,new Insets(0,5,5,5)));
    
    add(accessLabel, makeGridBagConstraints(0,2,1,1,GridBagConstraints.WEST));
    
    gbc = makeGridBagConstraints(0,3,2,1,GridBagConstraints.CENTER,new Insets(0,5,5,5));
    add(access, gbc);
    
    gbc = makeGridBagConstraints(0,4,2,1,GridBagConstraints.WEST);
    add(tokenInfo, gbc);
    
    gbc = makeGridBagConstraints(0,6,1,1,GridBagConstraints.WEST);
    gbc.fill = GridBagConstraints.HORIZONTAL;
    add(deleteToken, gbc);
    
    gbc = makeGridBagConstraints(0,6,2,1,GridBagConstraints.CENTER);
    add(requestToken, gbc);
    
    gbc = makeGridBagConstraints(1,6,1,1,GridBagConstraints.WEST);
    gbc.fill = GridBagConstraints.HORIZONTAL;
    add(verifyToken, gbc);
    
    gbc = makeGridBagConstraints(1,7,1,1,GridBagConstraints.EAST);
    add(done, gbc);
    
    ActionListener actionListener = owner.getActionListener();
    requestToken.addActionListener(actionListener);
    deleteToken.addActionListener(actionListener);
    verifyToken.addActionListener(actionListener);
    done.addActionListener(actionListener);

    pack();
}
 
開發者ID:partouf,項目名稱:Chatty-Twitch-Client,代碼行數:46,代碼來源:TokenDialog.java

示例7: TokenGetDialog

import chatty.gui.MainGui; //導入方法依賴的package包/類
public TokenGetDialog(MainGui owner) {
    super(owner,"Get login data",true);
    this.setResizable(false);
    this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    this.addWindowListener(owner.getWindowListener());
    
    info = new LinkLabel(INFO, owner.getLinkLabelListener());
    
    setLayout(new GridBagLayout());
    
    updateUrl();
    GridBagConstraints gbc;
    add(info,makeGridBagConstraints(0,0,2,1,GridBagConstraints.CENTER));
    
    gbc = makeGridBagConstraints(0, 1, 2, 1, GridBagConstraints.WEST);
    gbc.insets = new Insets(5,5,0,5);
    includeReadUserAccess.setSelected(true);
    includeReadUserAccess.setToolTipText("To get notified when streams you "
            + "follow go online.");
    add(includeReadUserAccess, gbc);
    gbc = makeGridBagConstraints(0, 2, 2, 1, GridBagConstraints.WEST);
    gbc.insets = new Insets(0,5,0,5);
    includeEditorAccess.setToolTipText("To be able to edit your channel's title and game.");
    add(includeEditorAccess,gbc);
    gbc = makeGridBagConstraints(0,3,2,1,GridBagConstraints.WEST);
    gbc.insets = new Insets(0,5,5,5);
    includeCommercialAccess.setToolTipText("To be able to run commercials on your stream.");
    add(includeCommercialAccess,gbc);
    gbc = makeGridBagConstraints(0,4,2,1,GridBagConstraints.CENTER);
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 1;
    urlField.setEditable(false);
    add(urlField, gbc);
    gbc = makeGridBagConstraints(0,5,1,1,GridBagConstraints.EAST);
    gbc.insets = new Insets(0,5,10,5);
    add(copyUrl,gbc);
    gbc = makeGridBagConstraints(1,5,1,1,GridBagConstraints.EAST);
    gbc.insets = new Insets(0,0,10,5);
    add(openUrl,gbc);
    add(status,makeGridBagConstraints(0,6,2,1,GridBagConstraints.CENTER));
    add(close,makeGridBagConstraints(1,7,1,1,GridBagConstraints.EAST));
    
    openUrl.addActionListener(this);
    copyUrl.addActionListener(this);
    close.addActionListener(owner.getActionListener());
    
    includeEditorAccess.addItemListener(this);
    includeCommercialAccess.addItemListener(this);
    includeReadUserAccess.addItemListener(this);
    
    reset();
    updateUrl();
    
    pack();
}
 
開發者ID:pokemane,項目名稱:TwitchChatClient,代碼行數:56,代碼來源:TokenGetDialog.java


注:本文中的chatty.gui.MainGui.getLinkLabelListener方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。