Difference between revisions of "TabDocumentExtension"

From OpenKM Documentation
Jump to: navigation, search
(Created page with '== Methods == setLang(String code) langRefresh() getTabText() set(GWTDocument doc) setVisibleButtons(boolean visible) == setLang(String code) == Executed each time user int…')
 
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Methods ==
 
== Methods ==
setLang(String code)
+
=== getTabText ===
langRefresh()
 
getTabText()
 
set(GWTDocument doc)
 
setVisibleButtons(boolean visible)
 
 
 
== setLang(String code) ==
 
Executed each time user interface language is changed. It's executed always before any langRefresh.
 
 
 
 
 
== langRefresh ==
 
Executed each time user interface is changed language
 
 
 
 
 
== getTabText ==
 
 
Used by OpenKM to get the tab text.
 
Used by OpenKM to get the tab text.
 
 
== set(GWTDocument doc) ==
 
Any time there's some document selected ( changed in browser ) executed this method by OpenKM in order to refreshing document panel information.
 
 
 
== setVisibleButtons(boolean visible) ==
 
Some buttons might not be visible, for example in trash view.
 
 
  
 
== Example ==
 
== Example ==
 +
<source lang="java">
 
public class TabDocumentExample extends TabDocumentExtension {
 
public class TabDocumentExample extends TabDocumentExtension {
 
 
VerticalPanel vPanel;
 
VerticalPanel vPanel;
        String lang = "en-GB";
 
 
         String tabText = "Tab example";
 
         String tabText = "Tab example";
 
 
Line 46: Line 22:
 
}
 
}
  
@Override
 
public void langRefresh() {
 
if (lang.equals(""en-GB"")) {
 
                  tabText = "Tab example";
 
} else {
 
                  tabText = "Tab other";
 
                }
 
}
 
 
@Override
 
public void set(GWTDocument doc) {
 
// TODO Auto-generated method stub
 
}
 
 
@Override
 
public void setVisibleButtons(boolean visible) {
 
// TODO Auto-generated method stub
 
 
}
 
 
@Override
 
public void setLang(String code) {
 
lang = code;
 
}
 
 
}
 
}
 +
</source>
  
[[Category: OpenKM plugin extensions]]
+
[[Category: Extension Guide]]

Latest revision as of 07:29, 24 September 2012

Methods

getTabText

Used by OpenKM to get the tab text.

Example

public class TabDocumentExample extends TabDocumentExtension {
	VerticalPanel vPanel;
        String tabText = "Tab example";
	
	public TabDocumentExample() {
		HTML html = new HTML("Content tab example");
		vPanel = new VerticalPanel();
		vPanel.add(html);
		
		initWidget(vPanel);
	}

	@Override
	public String getTabText() {
		return tabText;
	}

}