本文整理汇总了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);
}