當前位置: 首頁>>代碼示例>>Java>>正文


Java World類代碼示例

本文整理匯總了Java中info.gridworld.world.World的典型用法代碼示例。如果您正苦於以下問題:Java World類的具體用法?Java World怎麽用?Java World使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


World類屬於info.gridworld.world包,在下文中一共展示了World類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: locationClicked

import info.gridworld.world.World; //導入依賴的package包/類
/**
 * Callback on mousePressed when editing a grid.
 */
private void locationClicked() {
    World<T> world = parentFrame.getWorld();
    Location loc = display.getCurrentLocation();
    if (loc != null && !world.locationClicked(loc))
        editLocation();
    parentFrame.repaint();
}
 
開發者ID:CBSkarmory,項目名稱:AWGW,代碼行數:11,代碼來源:GUIController.java

示例2: deleteLocation

import info.gridworld.world.World; //導入依賴的package包/類
/**
 * Edits the contents of the current location, by displaying the constructor
 * or method menu.
 */
public void deleteLocation() {
    World<T> world = parentFrame.getWorld();
    Location loc = display.getCurrentLocation();
    if (loc != null) {
        world.remove(loc);
        parentFrame.repaint();
    }
}
 
開發者ID:CBSkarmory,項目名稱:AWGW,代碼行數:13,代碼來源:GUIController.java

示例3: locationClicked

import info.gridworld.world.World; //導入依賴的package包/類
/**
 * Callback on mousePressed when editing a grid.
 */
private void locationClicked()
{
    World<T> world = parentFrame.getWorld();
    Location loc = display.getCurrentLocation();
    if (loc != null && !world.locationClicked(loc))
        editLocation();
    parentFrame.repaint();
}
 
開發者ID:ReagentX,項目名稱:heidnerComputerScienceProjects,代碼行數:12,代碼來源:GUIController.java

示例4: deleteLocation

import info.gridworld.world.World; //導入依賴的package包/類
/**
 * Edits the contents of the current location, by displaying the constructor
 * or method menu.
 */
public void deleteLocation()
{
    World<T> world = parentFrame.getWorld();
    Location loc = display.getCurrentLocation();
    if (loc != null)
    {
        world.remove(loc);
        parentFrame.repaint();
    }
}
 
開發者ID:ReagentX,項目名稱:heidnerComputerScienceProjects,代碼行數:15,代碼來源:GUIController.java

示例5: getWorld

import info.gridworld.world.World; //導入依賴的package包/類
/**
 * Gets the world that this frame displays
 * @return the world
 */
public World<T> getWorld()
{
    return world;
}
 
開發者ID:ReagentX,項目名稱:heidnerComputerScienceProjects,代碼行數:9,代碼來源:WorldFrame.java

示例6: ForLoopCircles

import info.gridworld.world.World; //導入依賴的package包/類
public ForLoopCircles()
{
    circleGrid =    new BoundedGrid<String>(1,10);
    circleWorld = new World<String>(circleGrid);
}
 
開發者ID:ReagentX,項目名稱:heidnerComputerScienceProjects,代碼行數:6,代碼來源:ForLoopCircles.java

示例7: BoxWord

import info.gridworld.world.World; //導入依賴的package包/類
public BoxWord()
{
	charGrid = 	new BoundedGrid<String>(0,0);
	charWorld = new World<String>(charGrid);
}
 
開發者ID:ReagentX,項目名稱:heidnerComputerScienceProjects,代碼行數:6,代碼來源:BoxWord.java

示例8: drawCircles

import info.gridworld.world.World; //導入依賴的package包/類
public void drawCircles()
{
    for (int i=0; i<circleGrid.getNumCols(); i++){
        circleGrid.put(new Location(0,i),"O");
      }

    //add a for loop here
        


    circleWorld = new World<String>(circleGrid);        
}
 
開發者ID:ReagentX,項目名稱:heidnerComputerScienceProjects,代碼行數:13,代碼來源:ForLoopCircles.java

示例9: getWorld

import info.gridworld.world.World; //導入依賴的package包/類
/**
 * Gets the world that this frame displays
 *
 * @return the world
 */
public World<T> getWorld() {
    return world;
}
 
開發者ID:CBSkarmory,項目名稱:AWGW,代碼行數:9,代碼來源:WorldFrame.java


注:本文中的info.gridworld.world.World類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。