public class HomePane extends javax.swing.JRootPane implements HomeView
javax.swing.JRootPane.AccessibleJRootPane, javax.swing.JRootPane.RootLayoutjavax.swing.JComponent.AccessibleJComponentjava.awt.Container.AccessibleAWTContainerjava.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategyHomeView.ActionType, HomeView.OpenDamagedHomeAnswer, HomeView.SaveAnswerView.PointerTypeCOLOR_CHOOSER_DIALOG, contentPane, defaultButton, defaultPressAction, defaultReleaseAction, ERROR_DIALOG, FILE_CHOOSER_DIALOG, FRAME, glassPane, INFORMATION_DIALOG, layeredPane, menuBar, NONE, PLAIN_DIALOG, QUESTION_DIALOG, WARNING_DIALOGlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTDISPLAY_HOME_FURNITURE_ADDITIONAL_PROPERTY_ACTION_PREFIX, SORT_HOME_FURNITURE_ADDITIONAL_PROPERTY_ACTION_PREFIX| Constructor and Description |
|---|
HomePane(Home home,
UserPreferences preferences,
HomeController controller)
Creates home view associated with its controller.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attachView(View view)
Attaches the given
view to home view. |
boolean |
confirmDeleteCatalogSelection()
Displays a dialog that let user choose whether he wants to delete
the selected furniture from catalog or not.
|
boolean |
confirmExit()
Displays a dialog that let user choose whether he wants to exit
application or not.
|
HomeView.OpenDamagedHomeAnswer |
confirmOpenDamagedHome(java.lang.String homeName,
Home damagedHome,
java.util.List<Content> invalidContent)
Displays a dialog that lets user choose what he wants to do with a damaged home he tries to open it.
|
boolean |
confirmReplaceFurnitureLibrary(java.lang.String furnitureLibraryName)
Displays a dialog that lets user choose whether he wants to overwrite
an existing furniture library or not.
|
boolean |
confirmReplaceLanguageLibrary(java.lang.String languageLibraryName)
Displays a dialog that lets user choose whether he wants to overwrite
an existing language library or not.
|
boolean |
confirmReplacePlugin(java.lang.String pluginName)
Displays a dialog that lets user choose whether he wants to overwrite
an existing plug-in or not.
|
boolean |
confirmReplaceTexturesLibrary(java.lang.String texturesLibraryName)
Displays a dialog that lets user choose whether he wants to overwrite
an existing textures library or not.
|
HomeView.SaveAnswer |
confirmSave(java.lang.String homeName)
Displays a dialog that lets user choose whether he wants to save
the current home or not.
|
boolean |
confirmSaveNewerHome(java.lang.String homeName)
Displays a dialog that let user choose whether he wants to save
a home that was created with a newer version of Sweet Home 3D.
|
void |
detachView(View view)
Detaches the given
view from home view. |
void |
exportToCSV(java.lang.String csvFile)
Exports furniture list to a given CSV file.
|
void |
exportToOBJ(java.lang.String objFile)
Exports the objects of the 3D view to the given OBJ file.
|
protected void |
exportToOBJ(java.lang.String objFile,
Object3DFactory object3dFactory)
Exports to an OBJ file the objects of the 3D view created with the given factory.
|
void |
exportToSVG(java.lang.String svgFile)
Exports the plan objects to a given SVG file.
|
java.util.List<Selectable> |
getClipboardItems()
Returns the list of selectable items that are currently in clipboard
or
null if clipboard doesn't contain any selectable item. |
void |
invokeLater(java.lang.Runnable runnable)
Execute
runnable asynchronously in the thread
that manages toolkit events. |
boolean |
isClipboardEmpty()
Returns
true if clipboard doesn't contain data that
components are able to handle. |
void |
printToPDF(java.lang.String pdfFile)
Prints a home to a given PDF file.
|
void |
setActionEnabled(java.lang.String actionKey,
boolean enabled)
Enables or disables the action matching
actionKey. |
void |
setEnabled(HomeView.ActionType actionType,
boolean enabled)
Enables or disables the action matching
actionType. |
void |
setTransferEnabled(boolean enabled)
Enables or disables transfer between components.
|
void |
setUndoRedoName(java.lang.String undoText,
java.lang.String redoText)
Sets the
NAME and SHORT_DESCRIPTION properties value
of undo and redo actions. |
void |
showAboutDialog()
Displays an about dialog.
|
boolean |
showActionTipMessage(java.lang.String actionTipKey)
Displays the tip matching
actionTipKey and
returns true if the user chose not to display again the tip. |
java.util.List<Camera> |
showDeletedCamerasDialog()
Displays a dialog showing the list of cameras stored in home
and returns the ones selected by the user to be deleted.
|
void |
showError(java.lang.String message)
Displays
message in an error message box. |
java.lang.String |
showExportToCSVDialog(java.lang.String homeName)
Shows a content chooser save dialog to export furniture list in a CSV file.
|
java.lang.String |
showExportToOBJDialog(java.lang.String homeName)
Shows a content chooser save dialog to export a 3D home in a OBJ file.
|
java.lang.String |
showExportToSVGDialog(java.lang.String homeName)
Shows a content chooser save dialog to export a home plan in a SVG file.
|
java.lang.String |
showImportFurnitureLibraryDialog()
Displays a content chooser open dialog to choose a furniture library.
|
java.lang.String |
showImportLanguageLibraryDialog()
Displays a content chooser open dialog to choose a language library.
|
java.lang.String |
showImportTexturesLibraryDialog()
Displays a content chooser open dialog to choose a textures library.
|
protected void |
showLibraryFolderInSystem(java.lang.String libraryLocation)
Opens the folder containing the given library in a system window if possible.
|
void |
showMessage(java.lang.String message)
Displays
message in a message box. |
java.lang.String |
showNewHomeFromExampleDialog()
Displays a dialog to let the user choose a home example.
|
java.lang.String |
showOpenDialog()
Displays a content chooser open dialog to choose the name of a home.
|
java.util.concurrent.Callable<java.lang.Void> |
showPrintDialog()
Shows a print dialog to print the home displayed by this pane.
|
java.lang.String |
showPrintToPDFDialog(java.lang.String homeName)
Shows a content chooser save dialog to print a home in a PDF file.
|
java.lang.String |
showSaveDialog(java.lang.String homeName)
Displays a content chooser save dialog to choose the name of a home.
|
java.lang.String |
showStoreCameraDialog(java.lang.String cameraName)
Displays a dialog that lets the user choose a name for the current camera.
|
boolean |
showUpdatesMessage(java.lang.String updatesMessage,
boolean showOnlyMessage)
Displays the given message and returns
false if the user
doesn't want to be informed of the shown updates anymore. |
protected void |
updateOpenRecentHomeMenu(javax.swing.JMenu openRecentHomeMenu,
HomeController controller)
Updates
openRecentHomeMenu from current recent homes in preferences. |
addImpl, addNotify, createContentPane, createGlassPane, createLayeredPane, createRootLayout, getAccessibleContext, getContentPane, getDefaultButton, getGlassPane, getJMenuBar, getLayeredPane, getMenuBar, getUI, getUIClassID, getWindowDecorationStyle, isOptimizedDrawingEnabled, isValidateRoot, paramString, removeNotify, setContentPane, setDefaultButton, setDoubleBuffered, setGlassPane, setJMenuBar, setLayeredPane, setMenuBar, setUI, setWindowDecorationStyle, updateUIaddAncestorListener, 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, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, 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, validateTreeaction, 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, transferFocusUpCyclepublic HomePane(Home home, UserPreferences preferences, HomeController controller)
protected void updateOpenRecentHomeMenu(javax.swing.JMenu openRecentHomeMenu,
HomeController controller)
openRecentHomeMenu from current recent homes in preferences.public void setEnabled(HomeView.ActionType actionType, boolean enabled)
actionType.setEnabled in interface HomeViewpublic void setActionEnabled(java.lang.String actionKey,
boolean enabled)
actionKey.setActionEnabled in interface HomeViewpublic void setUndoRedoName(java.lang.String undoText,
java.lang.String redoText)
NAME and SHORT_DESCRIPTION properties value
of undo and redo actions. If a parameter is null,
the properties will be reset to their initial values.setUndoRedoName in interface HomeViewpublic void setTransferEnabled(boolean enabled)
setTransferEnabled in interface HomeViewpublic void detachView(View view)
view from home view.detachView in interface HomeViewpublic void attachView(View view)
view to home view.attachView in interface HomeViewpublic java.lang.String showOpenDialog()
showOpenDialog in interface HomeViewpublic java.lang.String showNewHomeFromExampleDialog()
showNewHomeFromExampleDialog in interface HomeViewpublic HomeView.OpenDamagedHomeAnswer confirmOpenDamagedHome(java.lang.String homeName, Home damagedHome, java.util.List<Content> invalidContent)
confirmOpenDamagedHome in interface HomeViewHomeView.OpenDamagedHomeAnswer.REMOVE_DAMAGED_ITEMS
if the user chose to remove damaged items,
HomeView.OpenDamagedHomeAnswer.REPLACE_DAMAGED_ITEMS
if he doesn't want to replace damaged items by red images and red boxes,
or HomeView.OpenDamagedHomeAnswer.DO_NOT_OPEN_HOME
if he doesn't want to open damaged home.public java.lang.String showImportLanguageLibraryDialog()
showImportLanguageLibraryDialog in interface HomeViewpublic boolean confirmReplaceLanguageLibrary(java.lang.String languageLibraryName)
confirmReplaceLanguageLibrary in interface HomeViewpublic java.lang.String showImportFurnitureLibraryDialog()
showImportFurnitureLibraryDialog in interface HomeViewpublic boolean confirmReplaceFurnitureLibrary(java.lang.String furnitureLibraryName)
confirmReplaceFurnitureLibrary in interface HomeViewpublic java.lang.String showImportTexturesLibraryDialog()
showImportTexturesLibraryDialog in interface HomeViewpublic boolean confirmReplaceTexturesLibrary(java.lang.String texturesLibraryName)
confirmReplaceTexturesLibrary in interface HomeViewpublic boolean confirmReplacePlugin(java.lang.String pluginName)
confirmReplacePlugin in interface HomeViewpublic java.lang.String showSaveDialog(java.lang.String homeName)
showSaveDialog in interface HomeViewpublic void showError(java.lang.String message)
message in an error message box.public void showMessage(java.lang.String message)
message in a message box.showMessage in interface HomeViewpublic boolean showActionTipMessage(java.lang.String actionTipKey)
actionTipKey and
returns true if the user chose not to display again the tip.showActionTipMessage in interface HomeViewpublic HomeView.SaveAnswer confirmSave(java.lang.String homeName)
confirmSave in interface HomeViewHomeView.SaveAnswer.SAVE
if the user chose to save home,
HomeView.SaveAnswer.DO_NOT_SAVE
if he doesn't want to save home,
or HomeView.SaveAnswer.CANCEL
if he doesn't want to continue current operation.public boolean confirmSaveNewerHome(java.lang.String homeName)
confirmSaveNewerHome in interface HomeViewtrue if user confirmed to save.public boolean confirmExit()
confirmExit in interface HomeViewtrue if user confirmed to exit.public void showAboutDialog()
showAboutDialog in interface HomeViewprotected void showLibraryFolderInSystem(java.lang.String libraryLocation)
public boolean showUpdatesMessage(java.lang.String updatesMessage,
boolean showOnlyMessage)
false if the user
doesn't want to be informed of the shown updates anymore.showUpdatesMessage in interface HomeViewupdatesMessage - the message to displayshowOnlyMessage - if false a check box proposing not to display
again shown updates will be shown.public java.util.concurrent.Callable<java.lang.Void> showPrintDialog()
showPrintDialog in interface HomeViewnull if the user canceled print.
The call method of the returned task may throw a
RecorderException exception if print failed
or an InterruptedRecorderException
exception if it was interrupted.public java.lang.String showPrintToPDFDialog(java.lang.String homeName)
showPrintToPDFDialog in interface HomeViewpublic void printToPDF(java.lang.String pdfFile)
throws RecorderException
printToPDF in interface HomeViewRecorderExceptionpublic java.lang.String showExportToCSVDialog(java.lang.String homeName)
showExportToCSVDialog in interface HomeViewpublic void exportToCSV(java.lang.String csvFile)
throws RecorderException
exportToCSV in interface HomeViewRecorderExceptionpublic java.lang.String showExportToSVGDialog(java.lang.String homeName)
showExportToSVGDialog in interface HomeViewpublic void exportToSVG(java.lang.String svgFile)
throws RecorderException
exportToSVG in interface HomeViewRecorderExceptionpublic java.lang.String showExportToOBJDialog(java.lang.String homeName)
showExportToOBJDialog in interface HomeViewpublic void exportToOBJ(java.lang.String objFile)
throws RecorderException
exportToOBJ in interface HomeViewRecorderExceptionprotected void exportToOBJ(java.lang.String objFile,
Object3DFactory object3dFactory)
throws RecorderException
RecorderExceptionpublic boolean confirmDeleteCatalogSelection()
confirmDeleteCatalogSelection in interface HomeViewtrue if user confirmed to delete.public java.lang.String showStoreCameraDialog(java.lang.String cameraName)
showStoreCameraDialog in interface HomeViewnull if the user canceled.public java.util.List<Camera> showDeletedCamerasDialog()
showDeletedCamerasDialog in interface HomeViewpublic boolean isClipboardEmpty()
true if clipboard doesn't contain data that
components are able to handle.isClipboardEmpty in interface HomeViewpublic java.util.List<Selectable> getClipboardItems()
null if clipboard doesn't contain any selectable item.getClipboardItems in interface HomeViewpublic void invokeLater(java.lang.Runnable runnable)
runnable asynchronously in the thread
that manages toolkit events.invokeLater in interface HomeView

© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License