当前位置: 首页>>代码示例>>Java>>正文


Java Globals类代码示例

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


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

示例1: UMLViewer

import org.tigris.gef.base.Globals; //导入依赖的package包/类
public UMLViewer(UMLDiagram d) {
	super(d.diagram);
	this.diagram = d;
	pagerButton = new PagerButton(diagram);
	this.getScrollPane().setCorner(JScrollPane.LOWER_RIGHT_CORNER, pagerButton);

	// this will make sure that the pager scrolls with the scrollbars
	this.getScrollPane().getViewport().addChangeListener(new ChangeListener() {
		public void stateChanged(ChangeEvent e) {
			pager.updateScroller();
			pager.repaint();
		}
	});

	this.addComponentListener(new UMLViewerComponentListener());
	this.addKeyListener(new UMLViewerKeyListener(this));
	this.addMouseListener(new UMLViewerMouseListener(this));
	this.addMouseMotionListener(new UMLViewerMouseMotionListener(this));

	this.pager = new Pager(this.diagram);
	this.pagerCaptionBar = new PagerCaptionBar(this.pager);

	
	this.setDrawingSize(1500, 1000);
	Globals.setShowFigTips(false);
	
	

}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:30,代码来源:UMLViewer.java

示例2: popClassifier

import org.tigris.gef.base.Globals; //导入依赖的package包/类
/**
      Called from the parser when a classifier is completely parsed.
   */
   public void popClassifier() {
       // now create diagram if it doesn't exists in project
if (importSession != null && importSession.isCreateDiagramsChecked()) {
    if (getDiagram() == null) {
	diagram = new DiagramInterface(Globals.curEditor());
	if (currentPackageName != null
	    && !currentPackageName.trim().equals("")) {
	    // create new diagram or select existing diagram for package
	    diagram.createOrSelectClassDiagram(currentPackage,
						currentPackageName);
	} else {
	    // create new diagram in root for classifier without package
	    diagram.createRootClassDiagram();
	}

    } else {
	if (currentPackageName != null) {
	    getDiagram().selectClassDiagram(currentPackage,
					    currentPackageName);
	}
	// the DiagramInterface is instantiated already
	// but the class is in a source file
	// with no package declaration
	else {
	    // create new diagram in root for classifier without package
	    diagram.createRootClassDiagram();
	}
    }
}
       // add the current classifier to the diagram.
       Object classifier = parseState.getClassifier();
       if (Model.getFacade().isAInterface(classifier)) {
           if (getDiagram() != null && importSession != null
                   && importSession.isCreateDiagramsChecked()) {
	diagram.addInterface(classifier,
			      importSession.isMinimiseFigsChecked());
           }
       } else {
           if (Model.getFacade().isAClass(classifier)) {
               if (getDiagram() != null && importSession != null
                       && importSession.isCreateDiagramsChecked()) {
                   diagram.addClass(classifier,
			      importSession.isMinimiseFigsChecked());
               }
           }
       }

       // Remove operations and attributes not in source
       parseState.removeObsoleteFeatures();

       // Remove inner classes not in source
       parseState.removeObsoleteInnerClasses();

       parseState = (ParseState) parseStateStack.pop();
   }
 
开发者ID:SpoonLabs,项目名称:gumtree-spoon-ast-diff,代码行数:59,代码来源:left_Modeller_1.134.java


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