Class LDStrategyEditor
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
jmt.framework.gui.components.JMTDialog
common.editors.LDStrategyEditor
- All Implemented Interfaces:
CommonConstants, ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants, EngineNodeConstants
Title: Load Dependent Service Time Strategy Editor
Description: An editor used to parametrize a load dependent service time strategy. This is a modal JDialog.
- Author:
- Bertoli Marco Date: 13-ott-2005 Time: 11.49.53
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classTable that must display all of data about user classes.protected classTable data model to implement customized data editingNested classes/interfaces inherited from class JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested classes/interfaces inherited from class Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AbstractActionprotected static final intprotected AbstractActionprotected static DecimalFormatprotected static Map<String, Distribution> static final Stringprotected static final intprotected AbstractActionprotected JSpinnerprotected JTableprotected LDStrategyFields inherited from class JMTDialog
AUTO_MANAGE_ON_CLOSEFields inherited from class JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class Dialog
DEFAULT_MODALITY_TYPEFields inherited from class Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface CommonConstants
ALL_CLASSES, ALL_MODES, ALL_STATIONS, BALKINGSTRATEGY_DESCRIPTION, BATCH_SIMULATION_DESCRIPTION, BLOCKING_DESCRIPTION, CLASS_TYPE_CLOSED, CLASS_TYPE_OPEN, CLASSES_DESCRIPTION, COMPATIBILITIES_DESCRIPTION, CONNECTIONS_DESCRIPTION, CONVERSION_WARNING_DESCRIPTION, DIM_BUTTON_L, DIM_BUTTON_M, DIM_BUTTON_S, DIM_BUTTON_XL, DIM_BUTTON_XS, DISTRIBUTION_BATCH, DISTRIBUTION_BERNOULLI_DISCRETE, DISTRIBUTION_BINOMIAL_DISCRETE, DISTRIBUTION_BURST, DISTRIBUTION_COXIAN, DISTRIBUTION_DETERMINISTIC, DISTRIBUTION_ERLANG, DISTRIBUTION_EXPONENTIAL, DISTRIBUTION_GAMMA, DISTRIBUTION_HYPEREXPONENTIAL, DISTRIBUTION_LOGNORMAL, DISTRIBUTION_MAP, DISTRIBUTION_MMPP2, DISTRIBUTION_NORMAL, DISTRIBUTION_PARETO, DISTRIBUTION_PHASETYPE, DISTRIBUTION_POISSON_DISCRETE, DISTRIBUTION_REPLAYER, DISTRIBUTION_SHIFTED_GEOMETRIC_DISCRETE, DISTRIBUTION_UNIFORM, DISTRIBUTION_UNIFORM_DISCRETE, DISTRIBUTION_WEIBULL, DISTRIBUTION_ZIPF_DISCRETE, FINITE_BLOCK, FINITE_DROP, FINITE_RETRIAL, FINITE_WAITING, FORK_CLASS_SWITCH, FORK_COMBINATION, FORK_MULTI_BRANCH_CLASS_SWITCH, FORK_PROBABILITIES, heightScaling, HTML_END, HTML_FONT_NOR_END, HTML_FONT_NORM, HTML_FONT_TIT_END, HTML_FONT_TITLE, HTML_START, IMG_JABAICON, IMG_JMCHICON, IMG_JMODELICON, IMG_JMVAICON, IMG_JSIMICON, IMG_JWATICON, IMG_SUITEICON, INFINITE_CAPACITY, JABA, JMVA, JOIN_MIX, JOIN_NORMAL, JOIN_PARTIAL, JSIM, JWAT, LARGE_ICON_SIZE_MENU_BAR, LARGE_ICON_SIZE_TOOL_BAR, LDROUTING_DESCRIPTION, LDSERVICE_DESCRIPTION, MAX_GUI_HEIGHT_ABOUT, MAX_GUI_HEIGHT_COMMON, MAX_GUI_HEIGHT_DIALOG_DEFAULT, MAX_GUI_HEIGHT_JABA, MAX_GUI_HEIGHT_JMCH, MAX_GUI_HEIGHT_JMVA, MAX_GUI_HEIGHT_JSIM_DISTRIB, MAX_GUI_HEIGHT_JSIM_PROBLEMS, MAX_GUI_HEIGHT_JSIM_RESULTS, MAX_GUI_HEIGHT_JSIM_STAT_OUTPUT, MAX_GUI_HEIGHT_JWAT, MAX_GUI_HEIGHT_JWAT_COLOR, MAX_GUI_HEIGHT_JWAT_STARTSCREEN, MAX_GUI_HEIGHT_LDEDITING, MAX_GUI_HEIGHT_LDHELP, MAX_GUI_HEIGHT_LDROUTING, MAX_GUI_HEIGHT_LDSTRATEGY, MAX_GUI_HEIGHT_POLLING, MAX_GUI_HEIGHT_PSSERVER, MAX_GUI_HEIGHT_QUICKHTML, MAX_GUI_HEIGHT_SERVER_FEATURES, MAX_GUI_HEIGHT_STARTSCREEN, MAX_GUI_HEIGHT_WHATIF_PROGRESS, MAX_GUI_HEIGHT_WHATIF_RESULTS, MAX_GUI_WIDTH_ABOUT, MAX_GUI_WIDTH_COMMON, MAX_GUI_WIDTH_DIALOG_DEFAULT, MAX_GUI_WIDTH_JABA, MAX_GUI_WIDTH_JMCH, MAX_GUI_WIDTH_JMVA, MAX_GUI_WIDTH_JSIM_DISTRIB, MAX_GUI_WIDTH_JSIM_PROBLEMS, MAX_GUI_WIDTH_JSIM_RESULTS, MAX_GUI_WIDTH_JSIM_STAT_OUTPUT, MAX_GUI_WIDTH_JWAT, MAX_GUI_WIDTH_JWAT_COLOR, MAX_GUI_WIDTH_JWAT_STARTSCREEN, MAX_GUI_WIDTH_LDEDITING, MAX_GUI_WIDTH_LDHELP, MAX_GUI_WIDTH_LDROUTING, MAX_GUI_WIDTH_LDSTRATEGY, MAX_GUI_WIDTH_POLLING, MAX_GUI_WIDTH_PSSERVER, MAX_GUI_WIDTH_QUICKHTML, MAX_GUI_WIDTH_SERVER_FEATURES, MAX_GUI_WIDTH_STARTSCREEN, MAX_GUI_WIDTH_WHATIF_PROGRESS, MAX_GUI_WIDTH_WHATIF_RESULTS, MAX_NUMBER_OF_CLASSES, MAX_NUMBER_OF_GROUPS, MAX_NUMBER_OF_PHASES, MAX_NUMBER_OF_REGIONS, MAX_NUMBER_OF_STATIONS, MAX_SMALL_ICON_SCREEN_HEIGHT, MAX_SMALL_ICON_SCREEN_WIDTH, MEASURE_LOG_DESCRIPTION, MEASURES_DESCRIPTION, METRIC_CONFIGURATIONS_DESCRIPTION, PAR1, PAR2, PARAMETRIC_ANALYSIS_DESCRIPTION, QUEUE_STRATEGY_DPS, QUEUE_STRATEGY_EDD, QUEUE_STRATEGY_EDF, QUEUE_STRATEGY_FCFS, QUEUE_STRATEGY_FCFS_PR, QUEUE_STRATEGY_GPS, QUEUE_STRATEGY_LCFS, QUEUE_STRATEGY_LCFS_PR, QUEUE_STRATEGY_LEPT, QUEUE_STRATEGY_LJF, QUEUE_STRATEGY_PS, QUEUE_STRATEGY_QBPS, QUEUE_STRATEGY_RAND, QUEUE_STRATEGY_SEPT, QUEUE_STRATEGY_SJF, QUEUE_STRATEGY_SRPT, QUEUE_STRATEGY_TBS, REFSOURCE_DESCRIPTION, ROUTING_CLASS_SWITCH, ROUTING_DISABLED, ROUTING_FASTESTSERVICE, ROUTING_LEASTUTILIZATION, ROUTING_LOADDEPENDENT, ROUTING_POWER_OF_K, ROUTING_PROBABILITIES, ROUTING_RANDOM, ROUTING_ROUNDROBIN, ROUTING_SHORTESTQL, ROUTING_SHORTESTRT, ROUTING_WEIGHTED_ROUNDROBIN, ROW_HEIGHT, SEMAPHORE_NORMAL, SERVER_FEATURE_CLASS_PARALLELISM, SERVER_FEATURE_DELAY_OFF_STRATEGIES, SERVER_FEATURE_PREEMPTIVE_STRATEGIES, SERVER_FEATURE_SCHEDULING_POLICY, SERVER_FEATURE_SERVER_COMPATIBILITIES, SERVER_FEATURE_SERVER_NAMES, SERVER_FEATURE_SERVERS_PER_SERVER_TYPE, SERVER_FEATURE_SETUP_STRATEGIES, SERVER_FEATURE_SWITCHOVER_STRATEGIES, SERVER_FEATURE_VACATION_STRATEGY, SERVER_PARAMETER_ADVANCED_FEATURES, SERVER_SETTINGS_DESCRIPTION, SERVER_VACATION_DESCRIPTION, SERVICE_DISABLED, SERVICE_LOAD_DEPENDENT, SERVICE_LOAD_INDEPENDENT, SERVICE_ZERO, SIMENGINE, SIMULATION_DESCRIPTION, SMALL_ICON_SIZE_MENU_BAR, SMALL_ICON_SIZE_TOOL_BAR, STATION_NAMES, STATION_QUEUE_STRATEGY_NON_PREEMPTIVE, STATION_QUEUE_STRATEGY_NON_PREEMPTIVE_PRIORITY, STATION_QUEUE_STRATEGY_POLLING, STATION_QUEUE_STRATEGY_POLLING_EXHAUSTIVE, STATION_QUEUE_STRATEGY_POLLING_GATED, STATION_QUEUE_STRATEGY_POLLING_LIMITED, STATION_QUEUE_STRATEGY_PREEMPTIVE, STATION_QUEUE_STRATEGY_PREEMPTIVE_PRIORITY, STATION_QUEUE_STRATEGY_PS, STATION_QUEUE_STRATEGY_PSSERVER, STATION_QUEUE_STRATEGY_PSSERVER_PRIORITY, STATION_SCHEDULING_POLICY_ALFS, STATION_SCHEDULING_POLICY_ALIS, STATION_SCHEDULING_POLICY_FAIRNESS, STATION_SCHEDULING_POLICY_FSF, STATION_SCHEDULING_POLICY_ORDER, STATION_SCHEDULING_POLICY_RAIS, STATION_TYPE_CLASSSWITCH, STATION_TYPE_DELAY, STATION_TYPE_FORK, STATION_TYPE_JOIN, STATION_TYPE_LOGGER, STATION_TYPE_PLACE, STATION_TYPE_ROUTER, STATION_TYPE_SCALER, STATION_TYPE_SEMAPHORE, STATION_TYPE_SERVER, STATION_TYPE_SINK, STATION_TYPE_SOURCE, STATION_TYPE_TERMINAL, STATION_TYPE_TRANSITION, STATION_VACATION_POLICY_BERNOULLI, STATION_VACATION_POLICY_MULTIPLE, STATION_VACATION_POLICY_NONE, STATION_VACATION_POLICY_SINGLE, STATIONS_DESCRIPTION, STATIONS_PAR_DESCRIPTION, SWITCHOVER_ZERO, TIMING_STRATEGY_IMMEDIATE, TIMING_STRATEGY_TIMED, WARNING_CLASS, WARNING_CLASS_INCOMING_ROUTING, WARNING_CLASS_OUTGOING_ROUTING, WARNING_CLASS_STATION, WARNING_INCOMING_ROUTING, WARNING_MULTI_CLASS, WARNING_OUTGOING_ROUTING, WARNING_STATION, widthScalingFields inherited from interface ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsConstructorDescriptionLDStrategyEditor(Dialog parent, LDStrategy strategy) Builds a new LDStrategyEditor Dialog.LDStrategyEditor(Frame parent, LDStrategy strategy) Builds a new LDStrategyEditor Dialog. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddRange()Adds a new range to the strategyprotected voiddeleteRange(int index) delete a range from strategy given the index the range to be deleted is displayed at inside the table.protected voidMultiple deletion of ranges.protected static Map<String, Distribution> Uses reflection to return a Map of distributions suitable for LDStrategy.static LDStrategyEditorgetInstance(Container parent, LDStrategy strategy) Returns a new instance of LDStrategyEditor, given parent container (used to find top level Dialog or Frame to create this dialog as modal)protected voidinitData(LDStrategy strategy) Initialize this dialog data structuresprotected voidinitGUI()Initialize all gui related stuffprotected voidsynchronizes components to display coherently global number of rangesprotected voidsetNumberOfRanges(int newNumber) Sets number of ranges in this strategyMethods inherited from class JMTDialog
canBeClosed, centerWindow, centerWindow, centerWindowWithOffset, close, doClose, moveToLowerRightCorner, setDefaultCloseOperationMethods inherited from class JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateMethods inherited from class Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBackMethods inherited from class Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFrontMethods inherited from class Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeMethods inherited from class Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
BORDERSIZE
protected static final int BORDERSIZE- See Also:
-
MAXRANGES
protected static final int MAXRANGES- See Also:
-
HELPFILE
- See Also:
-
distributions
-
df
-
strategy
-
rangesTable
-
okayAction
-
addRangeAction
-
deleteRange
-
rangesNumSpinner
-
-
Constructor Details
-
LDStrategyEditor
Builds a new LDStrategyEditor Dialog. This dialog is designed to be modal.- Parameters:
parent- owner Frame for this dialog.strategy- Reference to LDStrategy to be edited
-
LDStrategyEditor
Builds a new LDStrategyEditor Dialog. This dialog is designed to be modal.- Parameters:
parent- owner Dialog for this dialog.strategy- Reference to LDStrategy to be edited
-
-
Method Details
-
getInstance
Returns a new instance of LDStrategyEditor, given parent container (used to find top level Dialog or Frame to create this dialog as modal)- Parameters:
parent- any type of container contained in a Frame or Dialogstrategy- LDStrategy to be modified- Returns:
- new instance of LDStrategyEditor
-
findDistributions
Uses reflection to return a Map of distributions suitable for LDStrategy. (With mean value specifiable) Search's key is distribution name and value is the Class of found distribution- Returns:
- found distributions
-
initData
Initialize this dialog data structures- Parameters:
strategy- Reference to service strategy to be edited
-
initGUI
protected void initGUI()Initialize all gui related stuff -
setNumberOfRanges
protected void setNumberOfRanges(int newNumber) Sets number of ranges in this strategy- Parameters:
newNumber- new number of ranges
-
addRange
protected void addRange()Adds a new range to the strategy -
refreshComponents
protected void refreshComponents()synchronizes components to display coherently global number of ranges -
deleteRange
protected void deleteRange(int index) delete a range from strategy given the index the range to be deleted is displayed at inside the table. -
deleteSelectedClasses
protected void deleteSelectedClasses()Multiple deletion of ranges. Indices to ship call to precedent method, are retrieved through classtable methods (get selected rows)
-