package caida.otter;
import java.awt.*;
/*****************************************************************************
* File: PullDownMenu.java Class: PullDownMenu
* Goal: To build the PullDownMenu used by Otter, it also handles
* some of the selection of menu items.
*
* Written: Bradley Huffaker (12/16/97)
* Special Thanks: Darian Shimy
* Modified: Jaeyeon Jung (2/19/98)
* To add STEP_BY_STEP function
*
* For:Cooperative Association for Internet Data Analysis
******************************************************************************
******************************************************************************
By accessing this software, PULLDOWNMENU, you are duly informed of and
agree to be bound by the conditions described below in this notice:
This software product, PULLDOWNMENU, is developed by Bradley Huffaker, and
copyrighted(C) 1998 by the University of California, San Diego (UCSD),
with all rights reserved. UCSD administers the NSF grant to CAIDA,
number NCR-9711092, under which this code was developed.
There is no charge for PULLDOWNMENU software. You can redistribute it and/or
modify it under the terms of the GNU General Public License, v. 2 dated
June 1991 which is incorporated by reference herein. PULLDOWNMENU is
distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS, OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that the use of
it will not infringe on any third party's intellectual property
rights.
You should have received a copy of the GNU GPL along with the PULLDOWNMENU
program. Copies can also be obtained from
http://www.gnu.org/copyleft/gpl.html or by writing to
University of California, San Diego
SDSC/CAIDA
9500 Gilman Dr., MS-0505
La Jolla, CA 92093 - 0505 USA
Or contact INFO@CAIDA.ORG
*****************************************************************************/
public class PullDownMenu extends MenuBar
{
// -------------- File Part ----------------------
static public final String FILE = "File"; // Header for Menu
static public final String CLEAR = "Clear Network";
static public final String CLEAR_MAP = "Clear World Map";
static public final String CENTER = "Center Network";
static public final String ANIMATE = "Load Networks";
static public final String LOAD = "Load Network";
static public final String LOAD_MAP = "Load World Map";
static public final String SAVE_IMAGE = "Save as Image";
static public final String IMAGE_WITH_KEY = "Image with key";
static public final String IMAGE_WITHOUT_KEY = "Image without key";
static public final String EXIT = "Exit";
// --------------- Build Part ---------------------
static public final String BUILD = "Build Tools"; // Header for Menu
static public final String ADD_NODE = "Add Node";
static public final String ADD_LINK = "Add Link";
static public final String REMOVE = "Remove Object";
// --------------- Interaction ---------------------
static public final String INTERACT = "Interaction"; //Header for Menu
static public final String SELECT = "Select Object";
static public final String DESELECT = "Deselect All Objects";
static public final String ROOT_SELECT = "Select Root";
static public final String SELECT_NAME = "Select Root by Name";
static public final String SELECT_TREE = "Select Tree";
static public final String MOVE_NAMES = "Move Names";
static public final String MOVE = "Move/No Select";
static public final String STEP_BY_STEP = "Step By Step";
// --------------- Format Stuff
static public final String FORMAT_MENU = "Format";
static public final String FORMAT_IP = "IP Cluster";
static public final String FORMAT_GEO = "Semi Geographical";
static public final String FORMAT_ROOT = "Staight Topological";
static public final String FORMAT_VALUE = "Value Based";
static public final String FORMAT_FORCE = "Force Vectors";
static public final String FORMAT_FIND = "Find Extra Roots";
static public final String FORMAT_IP_PULL = "IP Pull";
static public final String FORMAT_AGIEN = "Reformat";
// ---------------- View ------------------------
static public final String VIEW = "View"; // Header for Menu
static public final String VIEW_HIDE= "Hide Selected";
static public final String LOW = "Low Res";
static public final String HIGH = "High Res";
static public final String ALL_NAMES = "Show all Names";
static public final String ROOT_NAMES = "Show Root Names";
static public final String NO_NAMES = "Show no Names";
static public final String SHOW_DATE = "Show/Hide Date";
static public final String SHOW_ARROWS = "Show/Hide Arrows";
// -------------- Tool -----------------------
static public final String TOOL = "Tool";
static public final String DIMENSION = "Change Image Dimensions";
// -------------- Zoom -----------------------
static public final String ZOOM = "Zoom";
static public final String ZOOM1 = ZOOM+ " 0.25";
static public final String ZOOM2 = ZOOM+ " 0.50";
static public final String ZOOM3 = ZOOM+ " 0.75";
static public final String ZOOM4 = ZOOM+ " 1.33";
static public final String ZOOM5 = ZOOM+ " 2.00";
static public final String ZOOM6 = ZOOM+ " 4.00";
// -------------- Line Size -----------------------
static public final String LINE_SIZE = "Line size";
static public final String LINE = "Line";
static public final String LINE1 = LINE+ " -2";
static public final String LINE2 = LINE+ " -1";
static public final String LINE3 = LINE+ " 1";
static public final String LINE4 = LINE+ " 2";
// -------------- Node Size -----------------------
static public final String NODE_SIZE = "Node size";
static public final String NODE = "Node";
static public final String NODE1 = NODE+ " -2";
static public final String NODE2 = NODE+ " -1";
static public final String NODE3 = NODE+ " 1";
static public final String NODE4 = NODE+ " 2";
// -------------- Arrow Size ----------------------
static public final String ARROW_SIZE = "Arrow size";
static public final String ARROW = "Arrow";
static public final String ARROW1 = ARROW+" -4";
static public final String ARROW2 = ARROW+" +4";
// -------------- Arrow sharpness -----------------
static public final String ARROW_SHARP = "Arrow sharpness";
static public final String ARROW_S = "Angle";
static public final String ARROW_S1 = ARROW_S+" -0.1";
static public final String ARROW_S2 = ARROW_S+" +0.1";
// -------------- Color by -----------------------
static public final String COLOR_BY= "Color Value";
// --------------- Color Method ---------------------
static public final String COLOR_METHOD = "Color Method";
static public final String METHOD_MASK = "Mask/Color by Value";
static public final String METHOD_SPECTRUM = "Spectrum Colors";
static public final String METHOD_DEFAULT = "Default Colors";
// --------------- Help ----------------------------
static public final String HELP = "Help"; // Header No iternal yet
static public final String ABOUT = "About";
static public final String COMMANDS = "Menu Commands";
static public final String OVERVIEW = "Overview of Objects";
public void addItem(String s, Menu m, boolean enabled)
{
MenuItem item = new MenuItem(s);
if (!enabled)
item.disable();
m.add(item);
}
protected Menu colorMenu;
public PullDownMenu (boolean isApplet)
{
// This is the File Menu
Menu fileMenu = new Menu(FILE);
addItem(CLEAR,fileMenu,true);
//if (!isApplet)
addItem(CLEAR_MAP,fileMenu,true);
addItem(CENTER,fileMenu,true);
fileMenu.addSeparator();
addItem(LOAD,fileMenu,true);
// This had to be removed because I don't want to pay for
// the PNG lib.
if (!isApplet)
{
Menu imageMenu = new Menu(SAVE_IMAGE);
addItem(IMAGE_WITH_KEY,imageMenu,true);
addItem(IMAGE_WITHOUT_KEY,imageMenu,true);
fileMenu.add(imageMenu);
}
/*
else
addItem(SAVE_IMAGE,fileMenu,false);
if (!isApplet)
{
addItem(LOAD_MAP,fileMenu,true);
addItem(ANIMATE,fileMenu,true);
}
*/
fileMenu.addSeparator();
addItem(EXIT,fileMenu,true);
// This is the building Menu
Menu buildMenu = new Menu(BUILD);
addItem(ADD_NODE,buildMenu,true);
addItem(ADD_LINK,buildMenu,true);
addItem(REMOVE,buildMenu,true);
// This is the Interaction Menu
Menu interactMenu = new Menu(INTERACT);
addItem(SELECT,interactMenu,true);
addItem(SELECT_TREE,interactMenu,true);
addItem(DESELECT,interactMenu,true);
interactMenu.addSeparator();
addItem(ROOT_SELECT,interactMenu,true);
addItem(SELECT_NAME,interactMenu,true);
interactMenu.addSeparator();
addItem(MOVE_NAMES,interactMenu,true);
addItem(MOVE,interactMenu,true);
interactMenu.addSeparator();
addItem(STEP_BY_STEP, interactMenu,true);
// This is the format Menu
Menu formatMenu = new Menu(FORMAT_MENU);
addItem(FORMAT_IP,formatMenu,true);
addItem(FORMAT_GEO,formatMenu,true);
addItem(FORMAT_ROOT,formatMenu,true);
addItem(FORMAT_FIND,formatMenu,true);
addItem(FORMAT_VALUE,formatMenu,true);
formatMenu.addSeparator();
addItem(FORMAT_IP_PULL,formatMenu,true);
// Commented out until we can get it to work
addItem(FORMAT_FORCE,formatMenu,true);
formatMenu.addSeparator();
addItem(FORMAT_AGIEN,formatMenu,true);
// This is the Resalution Menu
// This is the View Menu
Menu viewMenu = new Menu(VIEW);
addItem(LOW,viewMenu,true);
addItem(HIGH,viewMenu,true);
viewMenu.addSeparator();
addItem(ALL_NAMES,viewMenu,true);
addItem(ROOT_NAMES,viewMenu,true);
addItem(NO_NAMES,viewMenu,true);
viewMenu.addSeparator();
addItem(SHOW_DATE,viewMenu,true);
viewMenu.addSeparator();
addItem(SHOW_ARROWS,viewMenu,true);
// The Tool Menu
Menu toolMenu = new Menu(TOOL);
toolMenu.add(DIMENSION);
Menu zoomMenu = new Menu(ZOOM);
addItem(ZOOM1, zoomMenu, true);
addItem(ZOOM2, zoomMenu, true);
addItem(ZOOM3, zoomMenu, true);
addItem(ZOOM4, zoomMenu, true);
addItem(ZOOM5, zoomMenu, true);
addItem(ZOOM6, zoomMenu, true);
Menu lineMenu = new Menu(LINE_SIZE);
addItem(LINE1, lineMenu, true);
addItem(LINE2, lineMenu, true);
addItem(LINE3, lineMenu, true);
addItem(LINE4, lineMenu, true);
Menu nodeMenu = new Menu(NODE_SIZE);
addItem(NODE1, nodeMenu, true);
addItem(NODE2, nodeMenu, true);
addItem(NODE3, nodeMenu, true);
addItem(NODE4, nodeMenu, true);
Menu arrowSizeMenu = new Menu(ARROW_SIZE);
addItem(ARROW1, arrowSizeMenu, true);
addItem(ARROW2, arrowSizeMenu, true);
Menu arrowSharpMenu = new Menu(ARROW_SHARP);
addItem(ARROW_S1, arrowSharpMenu, true);
addItem(ARROW_S2, arrowSharpMenu, true);
toolMenu.add(zoomMenu);
toolMenu.add(lineMenu);
toolMenu.add(nodeMenu);
toolMenu.add(arrowSizeMenu);
toolMenu.add(arrowSharpMenu);
// The Color by Menu
colorMenu = new Menu(COLOR_BY);
// All it values are added by setGroups()
// The Color Methiod Menu
Menu methodMenu = new Menu(COLOR_METHOD);
addItem(METHOD_MASK,methodMenu,true);
addItem(METHOD_SPECTRUM,methodMenu,true);
addItem(METHOD_DEFAULT,methodMenu,true);
// The Help Menu
Menu helpMenu = new Menu(HELP);
addItem(ABOUT,helpMenu,true);
addItem(COMMANDS,helpMenu,true);
addItem(OVERVIEW,helpMenu,true);
add(fileMenu);
if (!isApplet)
add(buildMenu);
add(interactMenu);
add(formatMenu);
add(viewMenu);
add(toolMenu);
add(colorMenu);
add(methodMenu);
add(helpMenu);
}
MenuItem[][] items;
ValuesGroup[] groups;
public void setGroups(ValuesGroup[] groups_input)
{
for (int index=colorMenu.countItems()-1; index >= 0;index--)
colorMenu.remove(index);
int length = groups_input.length;
items = new MenuItem[length][];
groups = new ValuesGroup[length];
for (int index=0; index < groups.length; index++)
groups[index] = groups_input[index];
/*
int length = groups_input.length+1;
items = new MenuItem[length][];
groups = new ValuesGroup[length];
groups[0] = Node.DOMAIN_NAMES;
for (int index=1; index < groups.length; index++)
groups[index] = groups_input[index-1];
*/
for (int index=0; index < groups.length; index++)
{
ValuesGroup group = groups[index];
Menu menu = new Menu(group.getTitle());
String[] fields = group.getFields();
items[index] = new MenuItem[fields.length];
for (int i=0; i < fields.length;i++)
{
MenuItem item = new MenuItem(fields[i]);
menu.add(item);
items[index][i] = item;
}
colorMenu.add(menu);
}
}
public ValuesGroup getGroup(MenuItem item)
{
for (int index=0; index < items.length;index++)
for (int i=0; i < items[index].length; i++)
if (items[index][i] == item)
{
groups[index].setSelected(i);
return(groups[index]);
}
return null;
}
}
There was peace and harmony in the home of the Reverend Taylor. An air of neatness and prosperity was about his four-room adobe house. The mocking-bird that hung in a willow cage against the white wall, by the door, whistled sweet mimicry of the cheep of the little chickens in the back yard, and hopped to and fro and up and down on his perches, pecking at the red chili between the bars. From the corner of his eyes he could peek into the window, and it was bright with potted geraniums, white as the wall, or red as the chili, or pink as the little crumpled palm that patted against the glass to him. It was the first scene of the closing act of the tragic comedy of the Geronimo campaign. That wily old devil, weary temporarily of the bloodshed he had continued with more or less regularity for many years, had[Pg 297] sent word to the officers that he would meet them without their commands, in the Ca?on de los Embudos, across the border line, to discuss the terms of surrender. The officers had forthwith come, Crook yet hopeful that something might be accomplished by honesty and plain dealing; the others, for the most part, doubting. The two rival Ministers of England became every day more embittered against each other; and Bolingbroke grew more daring in his advances towards the Pretender, and towards measures only befitting a Stuart's reign. In order to please the High Church, whilst he was taking the surest measures to ruin it by introducing a popish prince, he consulted with Atterbury, and they agreed to bring in a Bill which should prevent Dissenters from educating their own children. This measure was sure to please the Hanoverian Tories, who were as averse from the Dissenters as the Whigs. Thus it would conciliate them and obtain their support at the[19] very moment that the chief authors of it were planning the ruin of their party. This Bill was called the Schism Bill, and enjoined that no person in Great Britain should keep any school, or act as tutor, who had not first subscribed the declaration to conform to the Church of England, and obtained a licence of the diocesan. Upon failure of so doing, the party might be committed to prison without bail; and no such licence was to be granted before the party produced a certificate of his having received the Sacrament according to the communion of the English Church within the last year, and of his having also subscribed the oaths of Allegiance and Supremacy. The earliest martial event of the year 1760 was the landing of Thurot, the French admiral, at Carrickfergus, on the 28th of February. He had been beating about between Scandinavia and Ireland till he had only three ships left, and but six hundred soldiers. But Carrickfergus being negligently garrisoned, Thurot made his way into the town and plundered it, but was soon obliged to abandon it. He was overtaken by Captain Elliot and three frigates before he had got out to sea, his ships were taken, he himself was killed, and his men were carried prisoners to Ramsey, in the Isle of Man. "I see you've got a cow here," said a large man wearing a dingy blue coat with a Captain's faded shoulder-straps. "I'm a Commissary, and it's my duty to take her." Suddenly they heard little Pete's voice calling: "Stop your ranting and tell me how the hogs got you." "Hold, Lord de Boteler," interrupted Father John, calmly; "the threat need not pass thy lips: I go; but before I depart I shall say, in spite of mortal tongue or mortal hand, that honor and true knighthood no longer preside in this hall, where four generations upheld them unsullied." HoME小明看看台湾视频发布
ENTER NUMBET 0017
www.geri2.net.cn
www.scivel.com.cn
danri8.com.cn
zibei0.com.cn
88aicn.com.cn
www.baila3.net.cn
www.ruwai2.net.cn
mucha8.com.cn
www.862675.org.cn
yzzdsm.net.cn