• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ThemeMap类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中bibliothek.gui.dock.common.theme.ThemeMap的典型用法代码示例。如果您正苦于以下问题:Java ThemeMap类的具体用法?Java ThemeMap怎么用?Java ThemeMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ThemeMap类属于bibliothek.gui.dock.common.theme包,在下文中一共展示了ThemeMap类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setupDockControl

import bibliothek.gui.dock.common.theme.ThemeMap; //导入依赖的package包/类
private void setupDockControl() {
	// theme
	dockControl.setTheme(ThemeMap.KEY_FLAT_THEME);

	// fix accelerators on non-mac systems
	if(!OSInfo.isMacOs()) {
		// fix accelerators for non-mac systems
		dockControl.putProperty( CControl.KEY_MAXIMIZE_CHANGE, KeyStroke.getKeyStroke( KeyEvent.VK_M, InputEvent.CTRL_MASK | InputEvent.SHIFT_DOWN_MASK ) );
		dockControl.putProperty( CControl.KEY_GOTO_EXTERNALIZED, KeyStroke.getKeyStroke( KeyEvent.VK_E, InputEvent.CTRL_MASK | InputEvent.SHIFT_DOWN_MASK ) );
		dockControl.putProperty( CControl.KEY_GOTO_NORMALIZED, KeyStroke.getKeyStroke( KeyEvent.VK_N, InputEvent.CTRL_MASK | InputEvent.SHIFT_DOWN_MASK ) );
	}

	// setup factory
	dockControl.addSingleDockableFactory(dockableFilter, dockFactory);

	// fix title colours using substance theme on windows/linux
	final TitleColorBridge bridge = new TitleColorBridge();
	final ColorManager colorManager = dockControl.getController().getColors();
	colorManager.publish(Priority.CLIENT, TitleColor.KIND_TITLE_COLOR, bridge);
	colorManager.publish(Priority.CLIENT, TitleColor.KIND_FLAP_BUTTON_COLOR, bridge);
}
 
开发者ID:phon-ca,项目名称:phon,代码行数:22,代码来源:DefaultEditorViewModel.java


示例2: CodeEditorWindow

import bibliothek.gui.dock.common.theme.ThemeMap; //导入依赖的package包/类
public CodeEditorWindow() {
  setContentPane(contentPane);

  control = new CControl(this);
  base = CLocation.base();
  control.setTheme(ThemeMap.KEY_ECLIPSE_THEME);
  setContentPane(control.getContentArea());

  RSyntaxTextArea textArea = new RSyntaxTextArea(20, 60);
  textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT);
  textArea.setCodeFoldingEnabled(true);
  textArea.setFont(new Font("Ubuntu Mono", textArea.getFont().getStyle(), 14));
  Theme theme = null;
  try {
    theme = Theme.load(getClass().getResourceAsStream("/org/fife/ui/rsyntaxtextarea/themes/dark.xml"));
    theme.apply(textArea);
  } catch (IOException e) {
    e.printStackTrace();
  }


  RTextScrollPane sp = new RTextScrollPane(textArea);
  DefaultSingleCDockable dockable = new DefaultSingleCDockable("code", "sss", sp);
  dockable.setCloseable(true);
  dockable.setExternalizable(false);


  CGrid grid = new CGrid(control);

  grid.add(0, 0, 1, 1, createDockable("scripts", Color.CYAN));
  grid.add(1, 0, 8, 7, createDockable("* main.fjs", Color.CYAN));
  grid.add(1, 0, 8, 7, createDockable("* log.fjs", Color.CYAN));
  grid.add(1, 0, 8, 7, dockable);
  grid.add(0, 8, 9, 2, createDockable("Logs", Color.BLACK));
  control.getContentArea().deploy(grid);

}
 
开发者ID:macbury,项目名称:ForgE,代码行数:38,代码来源:CodeEditorWindow.java


示例3: main

import bibliothek.gui.dock.common.theme.ThemeMap; //导入依赖的package包/类
public static void main( String[] args ){
  SwingThemeHelper.useGTK();
  JFrame frame = new JFrame( "Demo" );
  CControl control = new CControl( frame );
  control.setTheme(ThemeMap.KEY_ECLIPSE_THEME);
  control.handleResizeRequests();
  frame.add( new JPanel().add(control.getContentArea()) );

  CGrid grid = new CGrid( control );
  grid.add( 0, 1, 1, 3, createDockable( "Maps", Color.RED ) );
  grid.add( 0, 0, 1, 3, createDockable( "Terrain", Color.RED ) );
  grid.add( 0, 0, 1, 3, createDockable( "Objects", Color.RED ) );
  grid.add( 0, 1, 1, 3, createDockable( "Resources", Color.RED ) );
  grid.add( 0, 2, 2, 4, createDockable( "Properties", Color.GREEN ) );
  SingleCDockable mapDockable = createDockable("Map", Color.BLUE);
  mapDockable.setExtendedMode(ExtendedMode.MAXIMIZED);
  grid.add( 1, 0, 7, 10, mapDockable);
  control.getContentArea().deploy( grid );

  SingleCDockable black = createDockable( "Logs", Color.BLACK );
  control.addDockable( black );
  black.setLocation( CLocation.base().minimalSouth() );
  black.setVisible( true );


  frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
  frame.setBounds( 20, 20, 800, 600 );
  frame.setVisible( true );
  frame.setResizable(true);

  RootMenuPiece menu = new RootMenuPiece( "Windows", false );
  menu.add( new SingleCDockableListMenuPiece( control ));
  JMenuBar menuBar = new JMenuBar();
  menuBar.add( menu.getMenu() );
  frame.setJMenuBar( menuBar );
}
 
开发者ID:macbury,项目名称:ForgE,代码行数:37,代码来源:PropertyTableTest.java


示例4: GuiMain

import bibliothek.gui.dock.common.theme.ThemeMap; //导入依赖的package包/类
/**
 * CONSTRUCTOR
 */
public GuiMain(boolean ismultithread) {
	this.ismultithread = ismultithread;
	
	this.rootframe = new JFrame("Cruise Control");
	this.rootframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	CControl control = new CControl( this.rootframe );
	this.rootframe.setLayout(new BorderLayout());
	this.rootframe.add( control.getContentArea(), BorderLayout.CENTER );
       control.setTheme(ThemeMap.KEY_ECLIPSE_THEME);
	
	this.scheduledrawer = createScheduledrawer();
	this.waterdrawer = createWaterdrawer();
	this.powersumsdrawer = createPowerSumsdrawer();
	this.devicetable = createDevicetable();
	this.stateviewer = createStateViewer();
	// IMPORTANT: CruiseControl must be the last one to be in front of the others!
	this.cruisecontrol = createCruisecontrol();
	
	SingleCDockable scheduledock = new DefaultSingleCDockable("scheduledrawer", "Schedule", this.scheduledrawer);
	SingleCDockable waterdock = new DefaultSingleCDockable("waterdrawer", this.waterdrawer.getName(), this.waterdrawer);
	SingleCDockable powersumsdock = new DefaultSingleCDockable("powersumsdrawer", this.powersumsdrawer.getName(), this.powersumsdrawer);
	SingleCDockable devicetabledock = new DefaultSingleCDockable("devicetable", "Device Table", this.devicetable);
	SingleCDockable stateviewerdock = new DefaultSingleCDockable("stateviewer", "Registry State Viewer", this.stateviewer);
	SingleCDockable cruisecontroldock = new DefaultSingleCDockable("cruisecontrol", "Cruise Control", this.cruisecontrol);
	
	control.addDockable( scheduledock );
	control.addDockable( waterdock );
	control.addDockable( powersumsdock );
	control.addDockable( devicetabledock );
	control.addDockable( stateviewerdock );
	control.addDockable( cruisecontroldock );
	
	CContentAreaCenterLocation normal = CLocation.base().normal();
	
	scheduledock.setLocation(normal);
	waterdock.setLocation(normal.stack());
       powersumsdock.setLocation(normal.stack());
       
       TreeLocationRoot south = CLocation.base().normalSouth(0.4);
       
       devicetabledock.setLocation(south);
       stateviewerdock.setLocation(south.stack());

       TreeLocationRoot north = CLocation.base().normalNorth(0.1);

       cruisecontroldock.setLocation(north);
       
	scheduledock.setVisible(true);
	waterdock.setVisible(true);
	powersumsdock.setVisible(true);
	devicetabledock.setVisible(true);
	stateviewerdock.setVisible(true);
	cruisecontroldock.setVisible(true);

	this.rootframe.pack();
	this.rootframe.setBounds( 50, 50, 1000, 700 );
	this.rootframe.setVisible(true);
}
 
开发者ID:organicsmarthome,项目名称:OSHv2,代码行数:62,代码来源:GuiMain.java


示例5: GuiMain

import bibliothek.gui.dock.common.theme.ThemeMap; //导入依赖的package包/类
/**
	 * CONSTRUCTOR
	 */
	public GuiMain(boolean ismultithread) {
		this.ismultithread = ismultithread;
		
		this.rootframe = new JFrame("OSH Simulation GUI");
		this.rootframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.control = new CControl( this.rootframe );
		this.rootframe.setLayout(new BorderLayout());
		this.rootframe.add( control.getContentArea(), BorderLayout.CENTER );
        control.setTheme(ThemeMap.KEY_ECLIPSE_THEME);
		
		this.scheduledrawer = createScheduledrawer();		
//		this.waterdrawer = createWaterdrawer();
		this.powersumsdrawer = createPowerSumsdrawer();
		this.devicetable = createDevicetable();
		this.stateviewer = createStateViewer();
		//cruisecontrol must be the last one to be in front of the others
		this.cruisecontrol = createCruisecontrol();
		
		SingleCDockable scheduledock = new DefaultSingleCDockable("scheduledrawer", "Schedule", this.scheduledrawer);		
//		SingleCDockable waterdock = new DefaultSingleCDockable("waterdrawer", this.waterdrawer.getName(), this.waterdrawer);
		SingleCDockable powersumsdock = new DefaultSingleCDockable("powersumsdrawer", this.powersumsdrawer.getName(), this.powersumsdrawer);
		SingleCDockable devicetabledock = new DefaultSingleCDockable("devicetable", "Device Table", this.devicetable);
		SingleCDockable stateviewerdock = new DefaultSingleCDockable("stateviewer", "Registry State Viewer", this.stateviewer);
		SingleCDockable cruisecontroldock = new DefaultSingleCDockable("cruisecontrol", "OSH Simulation GUI", this.cruisecontrol);
		
		control.addDockable( scheduledock );		
//		control.addDockable( waterdock );
		control.addDockable( powersumsdock );
		control.addDockable( devicetabledock );
		control.addDockable( stateviewerdock );
		control.addDockable( cruisecontroldock );
		
		normalLocation = CLocation.base().normal();
		
		scheduledock.setLocation(normalLocation);
//		waterdock.setLocation(normal.stack());
        powersumsdock.setLocation(normalLocation.stack());
        
        TreeLocationRoot south = CLocation.base().normalSouth(0.4);
        
        devicetabledock.setLocation(south);
        stateviewerdock.setLocation(south.stack());

        TreeLocationRoot north = CLocation.base().normalNorth(0.1);

        cruisecontroldock.setLocation(north);
        
		scheduledock.setVisible(true);		
//		waterdock.setVisible(true);
		powersumsdock.setVisible(true);
		devicetabledock.setVisible(true);
		stateviewerdock.setVisible(true);
		cruisecontroldock.setVisible(true);

		this.rootframe.pack();
		this.rootframe.setBounds( 50, 50, 1000, 700 );
		this.rootframe.setVisible(true);
	}
 
开发者ID:organicsmarthome,项目名称:OSHv4,代码行数:62,代码来源:GuiMain.java


示例6: DockFramesController

import bibliothek.gui.dock.common.theme.ThemeMap; //导入依赖的package包/类
public DockFramesController(MainWindow mainWindow) {
    control = new CControl( mainWindow );
    base    = CLocation.base();
    control.setTheme(ThemeMap.KEY_ECLIPSE_THEME);
    mainWindow.mainContentPane.add(control.getContentArea(), BorderLayout.CENTER);

    this.mapEditorDockable = new DefaultSingleCDockable( "Map", "Map", mainWindow.openGlContainer );
    //mapEditorDockable = new DefaultMultipleCDockable("Map", "Map", mainWindow.openGlContainer);
    //mapEditorDockable.setExtendedMode(ExtendedMode.MAXIMIZED);
    mapEditorDockable.setLocation(base.normal());
    mapEditorDockable.setSticky(false);
    mapEditorDockable.setCloseable(false);
    mapEditorDockable.setMaximizable(false);
    mapEditorDockable.setStackable(false);
    mapEditorDockable.setSingleTabShown(true);
    mapEditorDockable.setMinimizable(false);
    mapEditorDockable.setExternalizable(false);

    this.terrainToolsDockable     = createDockablePanel("Terrain", mainWindow.terrainPanel, true);
    this.resourcesDockable        = createDockablePanel("Resources", mainWindow.resourcesController.buildTree(), true);
    this.objectsDockable          = createDockablePanel("Objects", new JScrollPane(new JTree()), true);
    this.objectInspectorDockable  = createDockablePanel("Object Properties", mainWindow.objectInspectorContainerPanel, true);
    this.terrainInspectorDockable = createDockablePanel("Terrain Properties", mainWindow.terrainInspectorPanel, true);
    this.mapTreeDockable          = createDockablePanel("Maps", mainWindow.mapTreeScroll, true);
    this.shaderErrorDockable      = createDockablePanel("Shader Error", mainWindow.shadersController.buildLogs(), true);
    mainWindow.shadersController.setDockable(shaderErrorDockable);
    CGrid grid = new CGrid( control );

    grid.add( 2, 1, 1, 2, mapTreeDockable);
    grid.add( 2, 1, 1, 2, shaderErrorDockable);
    grid.add( 0, 0, 1, 2, terrainToolsDockable );

    grid.add( 0, 0, 2, 1, resourcesDockable );
    grid.add( 0, 1, 2, 1, objectsDockable );
    grid.add( 0, 2, 2, 1, objectInspectorDockable);
    grid.add( 0, 2, 2, 1, terrainInspectorDockable);


/*

    grid.add( 2, 0, 9, 3, createDockablePanel("Code", sp, true));
*/
    grid.add(2, 0, 9, 3, mapEditorDockable);

    control.getContentArea().deploy(grid);

    mapTreeDockable.setLocation(base.minimalWest());
    shaderErrorDockable.setLocation(base.minimalWest());

    this.menu = new RootMenuPiece( "Panels", false );
    menu.add( new SingleCDockableListMenuPiece( control ));
  }
 
开发者ID:macbury,项目名称:ForgE,代码行数:53,代码来源:DockFramesController.java



注:本文中的bibliothek.gui.dock.common.theme.ThemeMap类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java MultiPoint类代码示例发布时间:2022-05-23
下一篇:
Java Formats类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap