⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 relationtypesframe.java

📁 toocom源代码,主要应用在本体匹配方面!
💻 JAVA
字号:
package toocom.ui;

import javax.swing.*;
import java.awt.*;
import toocom.ocgl.*;
import toocom.graphdrawing.*;
/**
 * This class represents the graphical window used for building the relation types hierarchy.
 * It provides creation and structuration fonctions by using its own toolbar or right
 * mouse click. The buttons of the toolbar allow to create, destroy or link relations with 
 * a is-a link. Right-clicking on a relation open a window with the properties of the relation.
 *
 * @author Fr閐閞ic F黵st
 */
public class RelationTypesFrame extends JPanel{
	
	private MainFrame mf;
	private RelationTypesToolBar rttb;
	private RelationTypesPanel rtp;

	public void setRelationTypeMode(int mode){
		rtp.setRelationTypeMode(mode);
	}
	
	public void clear(){
		rtp.clear();
	}

	/*Lance l'algorithme de dessin d'arbre*/
	public void refreshTree(){
		Ontology o = mf.getOntology();
		if(o != null){
			Graphics g = this.getGraphics();
			TreeDrawing td = new TreeDrawing(g, o.getRelationTypes(), mf.getOntologyLanguage());
			rtp.setPreferredSize(td.getDisplayArea());
			rtp.revalidate();
			repaint();
		}
	}

	public RelationTypesFrame(MainFrame mf){
		super();
		this.mf = mf;
		this.setLayout(new BorderLayout());

		//Create the tool bar panel
		rttb = new RelationTypesToolBar(this);
		rtp = new RelationTypesPanel(mf);

		JScrollPane sp = new JScrollPane(rtp);
		sp.setWheelScrollingEnabled(true);

    	this.add(rttb, BorderLayout.NORTH);
    	this.add(sp, BorderLayout.CENTER);
		rttb.setEnabled(true);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -