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


Java JButton.setHideActionText方法代碼示例

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


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

示例1: getApplicationToolbar

import javax.swing.JButton; //導入方法依賴的package包/類
private ProfilerToolbar getApplicationToolbar() {
        if (applicationToolbar == null) {
            applicationToolbar = ProfilerToolbar.create(true);

            applicationToolbar.addSpace(2);
            applicationToolbar.addSeparator();
            applicationToolbar.addSpace(5);

            JLabel apLabel = new GrayLabel(Bundle.ProfilerWindow_application());
            applicationToolbar.add(apLabel);
            
            applicationToolbar.addSpace(2);
            
            JButton apThreadDumpButton = new JButton(TakeThreadDumpAction.getInstance());
            apThreadDumpButton.setHideActionText(true);
//            apThreadDumpButton.setText(Bundle.ProfilerWindow_threadDump());
            applicationToolbar.add(apThreadDumpButton);
            
            applicationToolbar.addSpace(3);
            
            JButton apHeapDumpButton = new JButton(HeapDumpAction.getInstance());
            apHeapDumpButton.setHideActionText(true);
//            apHeapDumpButton.setText(Bundle.ProfilerWindow_heapDump());
            applicationToolbar.add(apHeapDumpButton);
            
            applicationToolbar.addSpace(3);
            
            JButton apGCButton = new JButton(RunGCAction.getInstance());
            apGCButton.setHideActionText(true);
//            apGCButton.setText(Bundle.ProfilerWindow_gc());
            applicationToolbar.add(apGCButton);
        }
        return applicationToolbar;
    }
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:35,代碼來源:ProfilerWindow.java

示例2: PopuleBarra

import javax.swing.JButton; //導入方法依賴的package包/類
public void PopuleBarra(JComponent obj) {
    ButtonGroup buttons = new ButtonGroup();
    Barra = obj;

    Acao ac = new Acao(editor, "?", "Controler.interface.BarraLateral.Nothing.img", "Controler.interface.BarraLateral.Nothing.Texto", null);
    JToggleButton btn = arrume(new JToggleButton(ac));
    buttons.add(btn);
    obj.add(btn);
    btn.setSelected(true);
    ac.IDX = -1;
    this.BtnNothing = btn;
    int i = 0;
    for (ConfigAcao ca : Lista) {
        if (ca.tipo == TipoConfigAcao.tpBotoes || ca.tipo == TipoConfigAcao.tpAny) {
            ac = new Acao(editor, ca.texto, ca.ico, ca.descricao, ca.command);
            ac.IDX = i++;
            btn = arrume(new JToggleButton(ac));
            buttons.add(btn);
            //obj.add(btn);
            listaBotoes.put(ca.command, btn);
        }
    }
    menuComandos c = menuComandos.cmdDel;
    String str = "Controler.comandos." + c.toString().substring(3).toLowerCase();
    ac = new Acao(editor, Editor.fromConfiguracao.getValor(str + ".descricao"), str + ".img", str + ".descricao", c.toString());
    ListaDeAcoesEditaveis.add(ac);
    ac.normal = false;
    JButton btn2 = new JButton(ac);
    btn2.setHideActionText(true);
    btn2.setFocusable(false);
    btn2.setPreferredSize(new Dimension(40, 40));
    obj.add(btn2);

    LayoutManager la = obj.getLayout();
    if (la instanceof GridLayout) {
        ((GridLayout) la).setRows(i + 2);
    }
}
 
開發者ID:chcandido,項目名稱:brModelo,代碼行數:39,代碼來源:Controler.java


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