public class AuthorSingleFrame extends JPanel implements ResourceBridge, TestPlayerContainer, RunnableComponent, Constants, ActionListener
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
AC_MARGIN, ACTION_AUDIO, ACTION_HLP, ACTION_INFO, ACTION_NAME, ACTION_NEXT, ACTION_PREV, ACTION_REPORTS, ACTION_RESET, ACTION_RETURN, ACTIONS_COUNTER, ACTIVITY_OBJECT, AUDIO_ENABLED, BG_COLOR, COMMON_SETTINGS, COMPRESS_IMAGES, COOKIE, counterNames, DEFAULT, DEFAULT_BUNDLE, DEFAULT_RENDERING_HINTS, DYNAMIC_ACTIONS, ENABLED, EXIT_URL, EXTERNAL_OBJECT, FALSE, HAND_CURSOR, ID, INFO_URL_FRAME, JMF, LOGO_ICON, MEDIA_OBJECT, MEDIA_SYSTEM, MEDIA_SYSTEMS, MIN_CELL_SIZE, MYURL, NAV_BUTTONS_ALWAYS, NO_MEDIASYSTEM_WARN, NUM_ACTIONS, NUM_COUNTERS, OK_CURSOR, PRE_DRAW_IMAGES, PROGRAM, PROJECT_OBJECT, QT, QT61, REC_CURSOR, REPORTER_CLASS, REPORTER_PARAMS, SCORE_COUNTER, SEQUENCE_OBJECT, SKIN, SKIN_OBJECT, SYSTEM_SOUNDS, T_ACTIVITY, T_ANIM, T_AUDIO, T_CLIC, T_EXTERNAL, T_FONT, T_IMAGE, T_INST, T_JCLIC, T_MEDIA, T_MIDI, T_SEQUENCE, T_TEXT, T_UNKNOWN_MEDIA, T_URL, T_VIDEO, T_XML, TIME_COUNTER, TRACE, TRUE, URL_BASE, URL_OBJECT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
AuthorSingleFrame(Options options)
Creates a new instance of Author
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent actionEvent) |
void |
activate()
This method is called when the container gains the focus for the first time or after have lost
it.
|
protected void |
addRecentFile(String fName) |
void |
addTo(RootPaneContainer cont,
Object constraints)
Instructs this
RunnableComponent to be self-placed into the
specified RootPaneContainer . |
protected void |
attachProject() |
protected void |
buildActions() |
protected void |
checkActions() |
protected void |
checkMenu(boolean recreate) |
protected boolean |
checkSaveChanges() |
protected void |
checkTabbedPaneFocus(boolean focusLost) |
protected FileSystem |
createFileSystem() |
protected void |
createFrames() |
protected void |
createMenu() |
void |
displayUrl(String url,
boolean inFrame) |
protected void |
doImportActivities(String fullPath) |
protected boolean |
doSaveFile(String fName) |
void |
editActivity(String activityName) |
void |
end()
Notifies the component that the main program will be halted soon, and all resources must
be freed.
|
void |
exit() |
Action |
getAction(int id) |
protected Icon |
getActionIcon(int actionId) |
protected String |
getActionName(int actionId) |
JComponent |
getComponent() |
String |
getMsg(String key) |
protected int |
getNumActions() |
Options |
getOptions() |
InputStream |
getProgressInputStream(InputStream is,
int expectedLength,
String name) |
Player |
getTestPlayer() |
protected void |
init() |
boolean |
load(String fullPath,
String sequence) |
void |
load(String sFullPath,
String sSequence,
String sActivity) |
boolean |
newInstanceRequest(String param1,
String param2)
A new instance of the
RunnableComponent has been requested by the user. |
protected void |
postCreateMenu() |
protected boolean |
processActionEvent(String ac) |
protected boolean |
saveFile(boolean saveAs) |
protected void |
setActionsText() |
protected void |
setFrameTitle(String s) |
Messages |
setMessages() |
protected void |
setProject(JClicProject p) |
boolean |
start(String fullPath,
String sequence)
Instructs the
RunnableComponent to start working. |
void |
stop()
Instructs the RunnableComponent to stop working.
|
void |
test() |
protected void |
updateRecentFilesMenu() |
boolean |
windowCloseRequested()
Called by the main container when it receives a
windowClosing event. |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected Options options
protected Messages messages
protected JClicProject project
protected JFrame debugFrame
protected int recentFilesOffset
protected JMenuBar menuBar
protected JMenu fileMenu
protected JMenu recentFilesMenu
protected JMenu toolsMenu
protected JMenu helpMenu
protected JMenu editMenu
protected JMenu insertMenu
protected JMenu viewMenu
protected AuthorSettings settings
protected Player player
protected JTabbedPane tabbedPane
protected Action[] actions
protected Action[] projectActions
protected JDialog playerDlg
protected JClicProjectEditor projectEditor
protected EditorPanel mediaBagEditorPanel
protected EditorPanel activityBagEditorPanel
protected EditorPanel activitySequenceEditorPanel
protected EditorPanel projectSettingsEditorPanel
protected ProgressDialog progressDialog
public static final String MESSAGES_BUNDLE
public static final int ACTION_OPEN_FILE
public static final int ACTION_OPEN_URL
public static final int ACTION_SAVE_FILE
public static final int ACTION_SAVE_FILE_AS
public static final int ACTION_EXIT
public static final int ACTION_SETTINGS
public static final int ACTION_DOCTREE
public static final int ACTION_ABOUT
public static final int ACTION_NEW_PROJECT
public static final int ACTION_EDIT_PROJECT
public static final int ACTION_EDIT_MEDIA
public static final int ACTION_EDIT_ACTIVITIES
public static final int ACTION_EDIT_SEQ
public static final int ACTION_CREATE_HTML
public static final int ACTION_CREATE_INSTALLER
public static final int ACTION_IMPORT_ACTIVITIES
public static final int ACTION_EXPORT_HTML5
public static final int AUTHOR_NUM_ACTIONS
public static final String[] ACTION_NAMES
public static final String[] ACTION_ICONS
protected FocusListener focusListener
public AuthorSingleFrame(Options options)
protected final void init()
public void activate()
RunnableComponent
activate
in interface RunnableComponent
public InputStream getProgressInputStream(InputStream is, int expectedLength, String name)
getProgressInputStream
in interface ResourceBridge
public Options getOptions()
getOptions
in interface ResourceBridge
public String getMsg(String key)
getMsg
in interface ResourceBridge
public JComponent getComponent()
getComponent
in interface ResourceBridge
public void addTo(RootPaneContainer cont, Object constraints)
RunnableComponent
RunnableComponent
to be self-placed into the
specified RootPaneContainer
.addTo
in interface RunnableComponent
cont
- The container in wich the component should be placed.constraints
- The constraints used in the call to the add
method of the Container
. This parameter can be null
.public boolean start(String fullPath, String sequence)
RunnableComponent
RunnableComponent
to start working.start
in interface RunnableComponent
fullPath
- First parameter passed to the component. Can be null
.sequence
- Second parameter passed to the component. Can also be null
.true
if the component has been turned on, false
otherwise.public void stop()
RunnableComponent
stop
in interface RunnableComponent
public void end()
RunnableComponent
end
in interface RunnableComponent
public Messages setMessages()
protected void setProject(JClicProject p)
protected void setFrameTitle(String s)
protected void checkActions()
protected FileSystem createFileSystem()
protected void createMenu()
protected void postCreateMenu()
protected void checkMenu(boolean recreate)
protected void updateRecentFilesMenu()
protected int getNumActions()
protected void buildActions()
protected boolean saveFile(boolean saveAs)
protected boolean doSaveFile(String fName)
protected void doImportActivities(String fullPath)
protected void setActionsText()
protected String getActionName(int actionId)
protected Icon getActionIcon(int actionId)
public Action getAction(int id)
protected boolean processActionEvent(String ac)
protected void addRecentFile(String fName)
public void actionPerformed(ActionEvent actionEvent)
actionPerformed
in interface ActionListener
public void exit()
protected void attachProject()
protected void checkTabbedPaneFocus(boolean focusLost)
protected void createFrames()
public Player getTestPlayer()
getTestPlayer
in interface TestPlayerContainer
public void test()
test
in interface TestPlayerContainer
public boolean newInstanceRequest(String param1, String param2)
RunnableComponent
RunnableComponent
has been requested by the user.newInstanceRequest
in interface RunnableComponent
param1
- First parameter passed to the component. Can be null
.param2
- Second parameter passed to the component. Can also be null
.true
if the request was successfull, false
otherwise.protected boolean checkSaveChanges()
public boolean windowCloseRequested()
RunnableComponent
windowClosing
event.windowCloseRequested
in interface RunnableComponent
true
if the component can be safely disposed, false
otherwise.public void displayUrl(String url, boolean inFrame)
displayUrl
in interface ResourceBridge
public void editActivity(String activityName)
editActivity
in interface TestPlayerContainer
Copyright © 2004-15 Francesc Busquets (fbusquets@xtec.cat) & Departament d'Educació de la Generalitat de Catalunya (info@xtec.cat)
Licensed under the terms of the GNU General Public License.