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

📄 indexlocation.java

📁 这是我自己写的一个小的JAVA实现的俄罗斯方块
💻 JAVA
字号:
package net.rectang;public class IndexLocation {	private Index indexOne = null;	private Index indexTwo = null;	private Index indexThree = null;	private Index indexFour = null;		public IndexLocation() {	}		public IndexLocation(Index indexOne, Index indexTwo, Index indexThree,			Index indexFour) {		super();		this.indexOne = indexOne;		this.indexTwo = indexTwo;		this.indexThree = indexThree;		this.indexFour = indexFour;	}	public Index getIndexOne() {		return indexOne;	}	public void setIndexOne(Index indexOne) {		this.indexOne = indexOne;	}	public Index getIndexTwo() {		return indexTwo;	}	public void setIndexTwo(Index indexTwo) {		this.indexTwo = indexTwo;	}	public Index getIndexThree() {		return indexThree;	}	public void setIndexThree(Index indexThree) {		this.indexThree = indexThree;	}	public Index getIndexFour() {		return indexFour;	}	public void setIndexFour(Index indexFour) {		this.indexFour = indexFour;	}	public int getMaxWidth(){		int maxWidth = indexOne.getLocationX();		if(indexTwo.getLocationX() > maxWidth){			maxWidth = indexTwo.getLocationX();		}		if(indexThree.getLocationX() > maxWidth){			maxWidth = indexThree.getLocationX();		}		if(indexFour.getLocationX() > maxWidth){			maxWidth = indexFour.getLocationX();		}		return maxWidth;	}	public int getMaxHeight(){		int maxHeight = indexOne.getLocationY();		if(indexTwo.getLocationY() > maxHeight){			maxHeight  = indexTwo.getLocationY();		}		if(indexThree.getLocationY() > maxHeight){			maxHeight  = indexThree.getLocationY();		}		if(indexFour.getLocationY() > maxHeight){			maxHeight  = indexFour.getLocationY();		}		return maxHeight ;	}	public int getMinWidth(){		int minWidth = indexOne.getLocationX();		if(indexTwo.getLocationX() < minWidth){			minWidth = indexTwo.getLocationX();		}		if(indexThree.getLocationX() < minWidth){			minWidth = indexThree.getLocationX();		}		if(indexFour.getLocationX() < minWidth){			minWidth = indexFour.getLocationX();		}		return minWidth;	}	public int getMinHeight(){		int minHeight = indexOne.getLocationY();		if(indexTwo.getLocationY() < minHeight){			minHeight = indexTwo.getLocationY();		}		if(indexThree.getLocationY() < minHeight){			minHeight = indexThree.getLocationY();		}		if(indexFour.getLocationY() < minHeight){			minHeight = indexFour.getLocationY();		}		return minHeight;	}}

⌨️ 快捷键说明

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