일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Eclipse
- PLSQL
- GPS
- tomcat
- Android
- MFC
- ibsheet
- jsr 296
- MySQL
- node.js
- rowspan
- swingx
- Google Map
- 선택적조인
- PHP
- 전자정부프레임워크
- appspresso
- jQuery
- Spring
- JDOM
- oracle
- JSON
- dock
- Ajax
- iBATIS
- Struts
- 가우스
- WebLogic
- phonegap
- sencha touch
Archives
- Today
- Total
Where The Streets Have No Name
docking frames 예제(4) 본문
private void initCControl() {
CControl control = new CControl(getFrame());
getFrame().add(control.getContentArea());
CGrid grid = new CGrid(control);
grid.add(0, 0, 1, 1, createDockable2("Red", Color.RED));
grid.add(0, 1, 1, 1, createDockable2("Green", Color.GREEN));
grid.add(1, 0, 1, 1, createDockable2("Blue", Color.BLUE));
grid.add(1, 1, 1, 1, createDockable2("Yellow", Color.YELLOW));
control.getContentArea().deploy(grid);
SingleCDockable black = createDockable2("Black", Color.BLACK);
control.add(black);
black.setLocation(CLocation.base().minimalNorth());
black.setVisible(true);
RootMenuPiece dockLayout = new RootMenuPiece("Dock Layout", false);
dockLayout.add(new SubmenuPiece("Dock List", true, new SingleCDockableListMenuPiece(control)));
dockLayout.add(new SubmenuPiece("Theme", true, new CThemeMenuPiece(control)));
dockLayout.add(new SubmenuPiece("LookAndFeel", true, new CLookAndFeelMenuPiece(control)));
dockLayout.add(new SubmenuPiece("Layout", true, new CLayoutChoiceMenuPiece(control, true)));
dockLayout.add(CPreferenceMenuPiece.setup(control));
menuBar.add(dockLayout.getMenu());
DockController controller = control.intern().getController();
controller.setTheme(new EclipseTheme());
controller.getProperties().set(EclipseTheme.TAB_PAINTER, RectGradientPainter.FACTORY);
}
public static SingleCDockable createDockable2(String title, Color color) {
JPanel panel = new JPanel();
panel.setOpaque(true);
panel.setBackground(color);
DefaultSingleCDockable dockable = new DefaultSingleCDockable(title, title, panel);
dockable.setCloseable(true);
return dockable;
}