2015-08-20 39 views

回答

1

據我所知,出來就不可能檢測到鼠標動作的方塊(單擊,雙擊)的標籤上。

一種可能性是定義一個樣式爲「鏈​​接」的按鈕。這樣你就可以檢測鏈接上的點擊。

Form example with a link

Form example with a link

@Order(3500.0) 
public class ALinkButton extends AbstractButton { 

    @Override 
    protected int getConfiguredDisplayStyle() { 
    return DISPLAY_STYLE_LINK; 
    } 

    @Override 
    protected String getConfiguredLabel() { 
    return TEXTS.get("ALink"); 
    } 

    @Override 
    protected boolean getConfiguredProcessButton() { 
    return false; 
    } 

    @Override 
    protected void execClickAction() throws ProcessingException { 
    MessageBox.showOkMessage("Test", "link was clicked", null); 
    } 
} 
+0

鏈接按鈕沒有圖標的選項? –