本文整理匯總了Java中org.netbeans.swing.tabcontrol.DefaultTabDataModel類的典型用法代碼示例。如果您正苦於以下問題:Java DefaultTabDataModel類的具體用法?Java DefaultTabDataModel怎麽用?Java DefaultTabDataModel使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
DefaultTabDataModel類屬於org.netbeans.swing.tabcontrol包,在下文中一共展示了DefaultTabDataModel類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: prepareModel
import org.netbeans.swing.tabcontrol.DefaultTabDataModel; //導入依賴的package包/類
private void prepareModel() {
TabData[] td = new TabData[25];
int ct = 0;
for (char c='a'; c < 'z'; c++) {
char[] ch = new char[ct+1];
Arrays.fill (ch, c);
String name = new String (ch);
Component comp = new JLabel(name);
comp.setName (name);
td[ct] = new TabData (comp, ic, name, "tip:"+name);
ct++;
}
padX = 2;
padY = 2;
mdl = new DefaultTabDataModel (td);
JLabel jl = new JLabel();
jl.setBorder (BorderFactory.createEmptyBorder());
lay = new TestLayoutModel (mdl, jl);
lay.setPadding (new Dimension(padX, padY));
}
示例2: createImageOfTab
import org.netbeans.swing.tabcontrol.DefaultTabDataModel; //導入依賴的package包/類
@Override
public Image createImageOfTab(int tabIndex) {
TabData dt = slideBar.getModel().getTab(tabIndex);
if (dt.getComponent() instanceof TopComponent) {
DefaultTabDataModel tempModel = new DefaultTabDataModel( new TabData[] { dt } );
TabbedContainer temp = new TabbedContainer( tempModel, TabbedContainer.TYPE_VIEW );
temp.setSize( 300,300 );
return temp.createImageOfTab(0);
}
return null;
}
示例3: TabbedImpl
import org.netbeans.swing.tabcontrol.DefaultTabDataModel; //導入依賴的package包/類
public TabbedImpl( WinsysInfoForTabbedContainer winsysInfo, int orientation ) {
tabModel = new DefaultTabDataModel();
TabDisplayer displayer = TabDisplayerFactory.getDefault().createTabDisplayer( tabModel, orientation );
controller = new Controller( displayer );
container = new TabContainer(this, displayer, orientation );
getSelectionModel().addChangeListener( new ChangeListener() {
@Override
public void stateChanged( ChangeEvent e ) {
fireStateChanged();
}
});
}
示例4: initComponents
import org.netbeans.swing.tabcontrol.DefaultTabDataModel; //導入依賴的package包/類
private void initComponents() {
setLayout(new BorderLayout());
DefaultTabDataModel tabDataModel = new DefaultTabDataModel();
tabbedContainer = new TabbedContainer(tabDataModel,
TabbedContainer.TYPE_EDITOR,
WinsysInfoForTabbedContainer.getDefault(new MyWinsysInfoForTabbedContainer()));
tabbedContainer.setVisible(false);
desktopPane = new JDesktopPane();
add(tabbedContainer, BorderLayout.NORTH);
add(desktopPane, BorderLayout.CENTER);
}