├── .gitignore ├── LICENSE.txt ├── README.md ├── build.gradle ├── build_all.command ├── build_icons.command ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── icon_work ├── SmoothCSV.iconset │ ├── icon16x16.png │ ├── icon16x16@2x.png │ ├── icon_128x128.png │ ├── icon_128x128@2.png │ ├── icon_256x256.png │ ├── icon_256x256@2x.png │ ├── icon_32x32.png │ ├── icon_32x32@2x.png │ ├── icon_512x512.png │ └── icon_512x512@2x.png ├── app.ico └── icons │ ├── icon16x16.png │ ├── icon16x16@2x.png │ ├── icon_128x128.png │ ├── icon_128x128@2.png │ ├── icon_256x256.png │ ├── icon_256x256@2x.png │ ├── icon_32x32.png │ ├── icon_32x32@2x.png │ ├── icon_512x512.png │ └── icon_512x512@2x.png ├── settings.gradle ├── smoothcsv-app-modules ├── smoothcsv-core │ ├── build.gradle │ └── src │ │ └── main │ │ ├── java │ │ ├── com │ │ │ └── smoothcsv │ │ │ │ └── core │ │ │ │ ├── AfterStartupTask.java │ │ │ │ ├── ApplicationStatus.java │ │ │ │ ├── CoreEntryPoint.java │ │ │ │ ├── SmoothCsvApp.java │ │ │ │ ├── SmoothCsvCommandMapFactory.java │ │ │ │ ├── celleditor │ │ │ │ ├── SCTextArea.java │ │ │ │ └── SCTextPane.java │ │ │ │ ├── command │ │ │ │ ├── CellEditorCommandBase.java │ │ │ │ ├── ConvertCommandBase.java │ │ │ │ ├── CsvSheetCommandBase.java │ │ │ │ ├── GridCommand.java │ │ │ │ ├── SqlEditorCommandBase.java │ │ │ │ ├── SqlTableListCommandBase.java │ │ │ │ ├── ValuePanelCommandBase.java │ │ │ │ └── VisibleComponentCommandBase.java │ │ │ │ ├── component │ │ │ │ ├── AboutDialog.java │ │ │ │ ├── AsyncTaskDialog.java │ │ │ │ ├── AvailableEncodingDialog.java │ │ │ │ ├── CommandPalette.java │ │ │ │ ├── CsvMetaPanel.java │ │ │ │ ├── CsvPropertiesDialog.java │ │ │ │ ├── CsvReadOptionPanel.java │ │ │ │ ├── FilterableItemDialogBase.java │ │ │ │ ├── ReadCsvPropertiesDialog.java │ │ │ │ └── SmoothCsvComponentManager.java │ │ │ │ ├── condition │ │ │ │ └── AppConditions.java │ │ │ │ ├── constants │ │ │ │ ├── CoreSessionKeys.java │ │ │ │ └── UIConstants.java │ │ │ │ ├── csv │ │ │ │ ├── AvailableEncodingDialog.java │ │ │ │ ├── CsvMeta.java │ │ │ │ ├── FileBackupService.java │ │ │ │ ├── RecentFilesHistory.java │ │ │ │ ├── SmoothCsvReader.java │ │ │ │ └── SmoothCsvWriter.java │ │ │ │ ├── csvsheet │ │ │ │ ├── CsvFileChooser.java │ │ │ │ ├── CsvGridSheetCellRenderer.java │ │ │ │ ├── CsvGridSheetCellRendererUI.java │ │ │ │ ├── CsvGridSheetCellStringEditor.java │ │ │ │ ├── CsvGridSheetCellValuePanel.java │ │ │ │ ├── CsvGridSheetColumnHeader.java │ │ │ │ ├── CsvGridSheetColumnHeaderUI.java │ │ │ │ ├── CsvGridSheetCornerHeader.java │ │ │ │ ├── CsvGridSheetHeaderCellRenderer.java │ │ │ │ ├── CsvGridSheetHeaderCellRendererUI.java │ │ │ │ ├── CsvGridSheetModel.java │ │ │ │ ├── CsvGridSheetPane.java │ │ │ │ ├── CsvGridSheetRowHeader.java │ │ │ │ ├── CsvGridSheetTable.java │ │ │ │ ├── CsvGridSheetTableUI.java │ │ │ │ ├── CsvGridUIUtils.java │ │ │ │ ├── CsvSheetStatusLabel.java │ │ │ │ ├── CsvSheetSupport.java │ │ │ │ ├── CsvSheetTextPaneConfig.java │ │ │ │ ├── CsvSheetView.java │ │ │ │ ├── CsvSheetViewInfo.java │ │ │ │ └── edits │ │ │ │ │ ├── ChangePropertyEdit.java │ │ │ │ │ ├── ChangeValueEdit.java │ │ │ │ │ ├── ChangeValuesEdit.java │ │ │ │ │ ├── DeleteCellEdit.java │ │ │ │ │ ├── DeleteColumnsEdit.java │ │ │ │ │ ├── DeleteRowsEdit.java │ │ │ │ │ ├── DummyEdit.java │ │ │ │ │ ├── EditTransaction.java │ │ │ │ │ ├── GridSheetEditContainer.java │ │ │ │ │ ├── GridSheetModelUndoableEdit.java │ │ │ │ │ ├── GridSheetUndoManager.java │ │ │ │ │ ├── GridSheetUndoableEdit.java │ │ │ │ │ ├── InserColumnsEdit.java │ │ │ │ │ ├── InserRowsEdit.java │ │ │ │ │ ├── InsertCellEdit.java │ │ │ │ │ ├── MultiGridSheetEditContainer.java │ │ │ │ │ ├── PartialSortEdit.java │ │ │ │ │ ├── SingleGridSheetEditContainer.java │ │ │ │ │ ├── SortEdit.java │ │ │ │ │ ├── SpecifiedRowsSortEdit.java │ │ │ │ │ └── ToggleHeaderRowEdit.java │ │ │ │ ├── filter │ │ │ │ ├── CellValue.java │ │ │ │ ├── ConditionItemDialog.java │ │ │ │ ├── ConditionItemPanel.java │ │ │ │ ├── Criteria.java │ │ │ │ ├── FilterConditionGroup.java │ │ │ │ ├── FilterConditionItem.java │ │ │ │ ├── FilterConditionPanel.java │ │ │ │ ├── FilterConditions.java │ │ │ │ ├── FilterDialog.java │ │ │ │ ├── FilterOperationPanel.java │ │ │ │ ├── FixedValue.java │ │ │ │ └── IValue.java │ │ │ │ ├── find │ │ │ │ ├── FindAndReplaceMatcher.java │ │ │ │ ├── FindAndReplacePanel.java │ │ │ │ ├── FindAndReplaceParams.java │ │ │ │ └── Regex.java │ │ │ │ ├── handler │ │ │ │ └── SmoothCsvErrorHandler.java │ │ │ │ ├── macro │ │ │ │ ├── ConsoleInputHandler.java │ │ │ │ ├── Macro.java │ │ │ │ ├── MacroException.java │ │ │ │ ├── MacroInfo.java │ │ │ │ ├── MacroRecorder.java │ │ │ │ ├── MacroRuntime.java │ │ │ │ ├── MacroUtils.java │ │ │ │ ├── SCAppMacroRuntime.java │ │ │ │ ├── SCWrapFactory.java │ │ │ │ ├── UserDefinedMacroList.java │ │ │ │ ├── api │ │ │ │ │ ├── App.java │ │ │ │ │ ├── CellEditor.java │ │ │ │ │ ├── CellVisitor.java │ │ │ │ │ ├── Clipboard.java │ │ │ │ │ ├── Command.java │ │ │ │ │ ├── Console.java │ │ │ │ │ ├── CsvProperties.java │ │ │ │ │ ├── CsvSheet.java │ │ │ │ │ ├── Macro.java │ │ │ │ │ ├── Range.java │ │ │ │ │ └── Window.java │ │ │ │ ├── apiimpl │ │ │ │ │ ├── APIBase.java │ │ │ │ │ ├── CellEditorImpl.java │ │ │ │ │ ├── CsvSheetImpl.java │ │ │ │ │ └── RangeImpl.java │ │ │ │ ├── bridge │ │ │ │ │ └── ConsoleBridge.java │ │ │ │ └── component │ │ │ │ │ ├── JsFileChooser.java │ │ │ │ │ ├── MacroConsolePanel.java │ │ │ │ │ ├── MacroEditor.java │ │ │ │ │ ├── MacroListItemPanel.java │ │ │ │ │ ├── MacroListPanel.java │ │ │ │ │ ├── MacroToolsPanel.java │ │ │ │ │ ├── MacroToolsWrapperPanel.java │ │ │ │ │ └── SimpleTabbedPane.java │ │ │ │ ├── menu │ │ │ │ ├── OpenFileMenuItem.java │ │ │ │ ├── RecentlyOpenedFilesMenu.java │ │ │ │ ├── RunMacroMenuItem.java │ │ │ │ └── UserDefinedMacrosMenu.java │ │ │ │ ├── preference │ │ │ │ ├── AppearenceEditorPrefPanel.java │ │ │ │ ├── EditEditorPrefPanel.java │ │ │ │ ├── EditorPrefPanel.java │ │ │ │ ├── FileEditorPrefPanel.java │ │ │ │ ├── GeneralPrefPanel.java │ │ │ │ └── KeyBindingsPrefPanel.java │ │ │ │ ├── sort │ │ │ │ ├── BlanksOption.java │ │ │ │ ├── CsvSorter.java │ │ │ │ ├── Order.java │ │ │ │ ├── SortCriteria.java │ │ │ │ ├── SortCriteriasDialog.java │ │ │ │ └── ValueType.java │ │ │ │ ├── sql │ │ │ │ ├── component │ │ │ │ │ ├── AbstractSqlTableDetailsPanel.java │ │ │ │ │ ├── SqlComponentConstants.java │ │ │ │ │ ├── SqlCsvPropertiesPanel.java │ │ │ │ │ ├── SqlEditor.java │ │ │ │ │ ├── SqlOutputOptionDialog.java │ │ │ │ │ ├── SqlTableColumnsEditorPanel.java │ │ │ │ │ ├── SqlTableList.java │ │ │ │ │ ├── SqlTablePreviewPanel.java │ │ │ │ │ └── SqlToolsDialog.java │ │ │ │ ├── engine │ │ │ │ │ ├── CsvSheet.java │ │ │ │ │ ├── SqlTaskWorker.java │ │ │ │ │ └── core │ │ │ │ │ │ ├── Csvsql.java │ │ │ │ │ │ └── CsvsqlEngine.java │ │ │ │ └── model │ │ │ │ │ ├── SqlColumnInfo.java │ │ │ │ │ ├── SqlCsvFileTableInfo.java │ │ │ │ │ ├── SqlCsvFileTables.java │ │ │ │ │ ├── SqlCsvSheetTableInfo.java │ │ │ │ │ ├── SqlHistory.java │ │ │ │ │ ├── SqlTableDefinitions.java │ │ │ │ │ └── SqlTableInfo.java │ │ │ │ ├── update │ │ │ │ ├── UpdateInfoDialog.java │ │ │ │ └── UpdateSettings.java │ │ │ │ └── util │ │ │ │ ├── AppUtils.java │ │ │ │ ├── CoreBundle.java │ │ │ │ ├── CoreSettings.java │ │ │ │ ├── CsvPropertySettings.java │ │ │ │ ├── SCAppearanceManager.java │ │ │ │ └── UISettings.java │ │ └── command │ │ │ ├── app │ │ │ ├── AboutCommand.java │ │ │ ├── CheckForUpdatesCommand.java │ │ │ ├── CloseAllCommand.java │ │ │ ├── CloseCommand.java │ │ │ ├── CloseOthersCommand.java │ │ │ ├── NewFileAsCommand.java │ │ │ ├── NewFileCommand.java │ │ │ ├── OpenAppDataDirectoryCommand.java │ │ │ ├── OpenFileAsCommand.java │ │ │ ├── OpenFileCommand.java │ │ │ ├── QuitCommand.java │ │ │ ├── ReloadAsCommand.java │ │ │ ├── ReloadCommand.java │ │ │ ├── SaveAllCommand.java │ │ │ ├── SaveAsCommand.java │ │ │ ├── SaveCommand.java │ │ │ ├── ShowSettingsCommand.java │ │ │ ├── ShowSqlToolsCommand.java │ │ │ └── ToggleCommandPaletteCommand.java │ │ │ ├── cell_editor │ │ │ ├── ActionCommand.java │ │ │ ├── DeleteToBeginningOfLineCommand.java │ │ │ ├── DeleteToEndOfLineCommand.java │ │ │ ├── FocusCommand.java │ │ │ ├── RedoCommand.java │ │ │ └── UndoCommand.java │ │ │ ├── convert │ │ │ ├── CamelCaseToSnakeCaseCommand.java │ │ │ ├── CapitalizeCommand.java │ │ │ ├── DecapitalizeCommand.java │ │ │ ├── LowerCaseCommand.java │ │ │ ├── SnakeCaseToCamelCaseCommand.java │ │ │ ├── SwapCaseCommand.java │ │ │ ├── TitleCaseCommand.java │ │ │ └── UpperCaseCommand.java │ │ │ ├── csvsheet │ │ │ └── ShowPropertiesCommand.java │ │ │ ├── find │ │ │ ├── CountCommand.java │ │ │ ├── HideCommand.java │ │ │ ├── NextCommand.java │ │ │ ├── PreviousCommand.java │ │ │ ├── ReplaceAllCommand.java │ │ │ ├── ReplaceNextCommand.java │ │ │ ├── ReplacePreviousCommand.java │ │ │ └── ShowCommand.java │ │ │ ├── grid │ │ │ ├── AutofitColumnWidthCommand.java │ │ │ ├── AutofitColumnWidthToSelectedCellCommand.java │ │ │ ├── CancelEditCommand.java │ │ │ ├── ClearCommand.java │ │ │ ├── CopyAsHtmlTableCommand.java │ │ │ ├── CopyAsJavaScriptDataCommand.java │ │ │ ├── CopyAsJsonCommand.java │ │ │ ├── CopyAsMarkdownTableCommand.java │ │ │ ├── CopyAsSqlInsertCommand.java │ │ │ ├── CopyCommand.java │ │ │ ├── CopyUsingFileFormatCommand.java │ │ │ ├── CopyWithoutMetaCharsCommand.java │ │ │ ├── CutCommand.java │ │ │ ├── CutUsingFileFormatCommand.java │ │ │ ├── DeleteCellCommand.java │ │ │ ├── DeleteColumnsCommand.java │ │ │ ├── DeleteRowsCommand.java │ │ │ ├── EditSelectedRangeAsTextCommand.java │ │ │ ├── FillDownCommand.java │ │ │ ├── FillLeftCommand.java │ │ │ ├── FillRightCommand.java │ │ │ ├── FillSeriesCommand.java │ │ │ ├── FillUpCommand.java │ │ │ ├── FilterCommand.java │ │ │ ├── FocusCommand.java │ │ │ ├── GoToLineCommand.java │ │ │ ├── GridSheetSelectCommand.java │ │ │ ├── InsertCellCommand.java │ │ │ ├── InsertColumnsLeftCommand.java │ │ │ ├── InsertColumnsRightCommand.java │ │ │ ├── InsertRowsAboveCommand.java │ │ │ ├── InsertRowsBelowCommand.java │ │ │ ├── MoveByPageCommand.java │ │ │ ├── MoveCommand.java │ │ │ ├── MoveToCommand.java │ │ │ ├── MoveToDataEdgeCommand.java │ │ │ ├── NextCellCommand.java │ │ │ ├── PasteCommand.java │ │ │ ├── PasteUsingFileFormatCommand.java │ │ │ ├── RedoCommand.java │ │ │ ├── RemoveDuplicateCommand.java │ │ │ ├── SelectAllCommand.java │ │ │ ├── SelectEntireColumnCommand.java │ │ │ ├── SelectEntireRowCommand.java │ │ │ ├── SortCommand.java │ │ │ ├── SortSelectedRangeCommand.java │ │ │ ├── SortSelectedRowsCommand.java │ │ │ ├── StartEditCommand.java │ │ │ ├── StartQuickEditCommand.java │ │ │ ├── StopEditCommand.java │ │ │ ├── ToggleUseFirstRowAsHeaderCommand.java │ │ │ └── UndoCommand.java │ │ │ ├── macro │ │ │ ├── OpenCommand.java │ │ │ ├── RunCommand.java │ │ │ ├── SaveCommand.java │ │ │ ├── ShowEditorCommand.java │ │ │ ├── ShowListCommand.java │ │ │ ├── ToggleConsoleCommand.java │ │ │ ├── ToggleMacroToolsCommand.java │ │ │ └── ToggleRecordingMacroCommand.java │ │ │ ├── macrolist │ │ │ ├── AddCommand.java │ │ │ ├── RemoveCommand.java │ │ │ └── RunCommand.java │ │ │ ├── sql │ │ │ ├── NextSqlCommand.java │ │ │ ├── PreviousSqlCommand.java │ │ │ ├── RunCommand.java │ │ │ └── ShowSqlHistoryCommand.java │ │ │ ├── value_panel │ │ │ ├── ActionCommand.java │ │ │ ├── CompressCommand.java │ │ │ ├── DeleteToBeginningOfLineCommand.java │ │ │ ├── DeleteToEndOfLineCommand.java │ │ │ ├── ExpandCommand.java │ │ │ ├── FocusCommand.java │ │ │ ├── RedoCommand.java │ │ │ ├── ToggleFloatingCommand.java │ │ │ └── UndoCommand.java │ │ │ └── view │ │ │ ├── NextTabCommand.java │ │ │ ├── PreviousTabCommand.java │ │ │ ├── ToggleCellValuePanelCommand.java │ │ │ ├── ToggleStatusBarCommand.java │ │ │ └── ToggleToolBarCommand.java │ │ └── resources │ │ ├── META-INF │ │ └── services │ │ │ └── com.smoothcsv.framework.modular.ModuleEntryPoint │ │ ├── application.properties │ │ ├── com │ │ └── smoothcsv │ │ │ └── core │ │ │ ├── filter │ │ │ ├── Criteria.properties │ │ │ └── Criteria_ja.properties │ │ │ └── sort │ │ │ ├── BlanksOption.properties │ │ │ ├── BlanksOption_ja.properties │ │ │ ├── Order.properties │ │ │ ├── Order_ja.properties │ │ │ ├── ValueType.properties │ │ │ └── ValueType_ja.properties │ │ ├── img │ │ ├── app │ │ │ ├── icon16x16.png │ │ │ ├── icon16x16@2x.png │ │ │ ├── icon_128x128.png │ │ │ ├── icon_128x128@2.png │ │ │ ├── icon_256x256.png │ │ │ ├── icon_256x256@2x.png │ │ │ ├── icon_32x32.png │ │ │ ├── icon_32x32@2x.png │ │ │ ├── icon_512x512.png │ │ │ └── icon_512x512@2x.png │ │ └── progress.gif │ │ ├── macro │ │ └── init.js │ │ ├── settings │ │ ├── core.prefs │ │ ├── csvprop.prefs │ │ ├── csvprop_ja.prefs │ │ ├── ui.prefs │ │ └── update.prefs │ │ └── smoothcsv-core │ │ ├── bundle.properties │ │ ├── bundle_ja.properties │ │ ├── message.properties │ │ ├── message_ja.properties │ │ ├── smoothcsv-command.tsv │ │ ├── smoothcsv-contextmenu.tsv │ │ ├── smoothcsv-contextmenu_ja.tsv │ │ ├── smoothcsv-keymap.tsv │ │ ├── smoothcsv-menubar.tsv │ │ ├── smoothcsv-menubar_ja.tsv │ │ ├── smoothcsv-toolbar.tsv │ │ └── smoothcsv-toolbar_ja.tsv ├── smoothcsv-debug │ ├── build.gradle │ └── src │ │ └── main │ │ ├── java │ │ ├── com │ │ │ └── smoothcsv │ │ │ │ └── debug │ │ │ │ ├── DebugEntryPoint.java │ │ │ │ └── DebugUtils.java │ │ └── command │ │ │ └── debug │ │ │ ├── EnableWatchThreadCommand.java │ │ │ ├── PrintCommandsCommand.java │ │ │ ├── PrintComponentTreeCommand.java │ │ │ ├── PrintConditionsCommand.java │ │ │ ├── PrintFocusOwnerCommand.java │ │ │ ├── PrintGridDataCommand.java │ │ │ ├── PrintKeymapCommand.java │ │ │ └── PrintMenuComponentTreeCommand.java │ │ └── resources │ │ ├── META-INF │ │ └── services │ │ │ └── com.smoothcsv.framework.modular.ModuleEntryPoint │ │ └── smoothcsv-debug │ │ ├── smoothcsv-command.tsv │ │ └── smoothcsv-keymap.tsv ├── smoothcsv-ja │ ├── build.gradle │ └── src │ │ └── main │ │ ├── java │ │ ├── com │ │ │ └── smoothcsv │ │ │ │ └── ja │ │ │ │ └── JaEntryPoint.java │ │ └── command │ │ │ └── convert │ │ │ ├── FullWidthToHalfWidthCommand.java │ │ │ ├── HalfWidthToFullWidthCommand.java │ │ │ ├── HiraganaToKatakanaCommand.java │ │ │ ├── KanaToLatinCommand.java │ │ │ ├── KatakanaToHiraganaCommand.java │ │ │ └── LatinToKatakanaCommand.java │ │ └── resources │ │ ├── META-INF │ │ └── services │ │ │ └── com.smoothcsv.framework.modular.ModuleEntryPoint │ │ └── smoothcsv-ja │ │ ├── smoothcsv-command.tsv │ │ └── smoothcsv-menubar_ja.tsv ├── smoothcsv-mac │ ├── build.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── smoothcsv │ │ │ └── mac │ │ │ └── MacEntryPoint.java │ │ └── resources │ │ └── META-INF │ │ └── services │ │ └── com.smoothcsv.framework.modular.ModuleEntryPoint └── smoothcsv-windows │ ├── build.gradle │ └── src │ └── main │ ├── java │ └── com │ │ └── smoothcsv │ │ └── windows │ │ └── WindowsEntryPoint.java │ └── resources │ ├── META-INF │ └── services │ │ └── com.smoothcsv.framework.modular.ModuleEntryPoint │ └── smoothcsv-windows │ ├── smoothcsv-menubar.tsv │ └── smoothcsv-menubar_ja.tsv ├── smoothcsv-commons ├── README.md ├── build.gradle └── src │ └── main │ ├── java │ └── com │ │ └── smoothcsv │ │ └── commons │ │ ├── collections │ │ └── ArrayMap.java │ │ ├── constants │ │ ├── CommonConstants.java │ │ ├── Direction.java │ │ ├── OperatorSymbol.java │ │ └── Orientation.java │ │ ├── data │ │ └── KeyValue.java │ │ ├── encoding │ │ └── FileEncoding.java │ │ ├── exception │ │ ├── CancellationException.java │ │ ├── IORuntimeException.java │ │ ├── IgnorableException.java │ │ └── UnexpectedException.java │ │ ├── functions │ │ ├── FileHandler.java │ │ └── IntRangeConsumer.java │ │ ├── io │ │ ├── BOMInputStream.java │ │ └── FileVisitor.java │ │ └── utils │ │ ├── ArrayUtils.java │ │ ├── BeanUtils.java │ │ ├── CharsetUtils.java │ │ ├── CollectionUtils.java │ │ ├── CsvUtils.java │ │ ├── EnumStringSupport.java │ │ ├── FileUtils.java │ │ ├── HtmlUtils.java │ │ ├── JsonUtils.java │ │ ├── NamePatternUtils.java │ │ ├── ObjectUtils.java │ │ ├── ReflectionUtils.java │ │ ├── RegexUtils.java │ │ ├── SerializeUtils.java │ │ ├── StringLineTokenizer.java │ │ ├── StringUtils.java │ │ └── ThrowableUtils.java │ └── resources │ └── com │ └── smoothcsv │ └── commons │ └── constants │ ├── Direction.properties │ ├── Direction_ja.properties │ ├── Orientation.properties │ └── Orientation_ja.properties ├── smoothcsv-debuglauncher-mac ├── build.gradle └── src │ └── main │ ├── java │ └── com │ │ └── smoothcsv │ │ └── SmoothCSV.java │ └── resources │ └── logback.xml ├── smoothcsv-framework ├── build.gradle └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── smoothcsv │ │ │ └── framework │ │ │ ├── Env.java │ │ │ ├── SCApplication.java │ │ │ ├── command │ │ │ ├── Command.java │ │ │ ├── CommandActionListener.java │ │ │ ├── CommandDef.java │ │ │ ├── CommandKeymap.java │ │ │ └── CommandRegistry.java │ │ │ ├── component │ │ │ ├── BaseTabView.java │ │ │ ├── ComponentManager.java │ │ │ ├── SCContentPane.java │ │ │ ├── SCFrame.java │ │ │ ├── SCMenuBar.java │ │ │ ├── SCRootPane.java │ │ │ ├── SCStatusBar.java │ │ │ ├── SCTabbedPane.java │ │ │ ├── SCTabbedPaneUI.java │ │ │ ├── SCToolBar.java │ │ │ ├── SCToolbarToggleButton.java │ │ │ ├── StatusItem.java │ │ │ ├── dialog │ │ │ │ ├── BasicFileChooser.java │ │ │ │ ├── DialogBase.java │ │ │ │ ├── DialogOperation.java │ │ │ │ ├── GenericMessageDialog.java │ │ │ │ ├── MessageDialogs.java │ │ │ │ └── NumberInputDialog.java │ │ │ ├── support │ │ │ │ ├── CommandActionMap.java │ │ │ │ ├── CommandInputMap.java │ │ │ │ ├── CommandMapFactory.java │ │ │ │ ├── DefaultCommandMapFactory.java │ │ │ │ ├── PopupMenuMouseAdopter.java │ │ │ │ ├── SCFocusManager.java │ │ │ │ ├── SmoothComponent.java │ │ │ │ ├── SmoothComponentManager.java │ │ │ │ └── SmoothComponentSupport.java │ │ │ └── view │ │ │ │ └── ViewInfo.java │ │ │ ├── condition │ │ │ ├── AndCondition.java │ │ │ ├── AvailableCondition.java │ │ │ ├── Condition.java │ │ │ ├── Conditions.java │ │ │ ├── FocusCondition.java │ │ │ ├── ManualCondition.java │ │ │ ├── NotCondition.java │ │ │ └── OrCondition.java │ │ │ ├── error │ │ │ ├── ErrorHandler.java │ │ │ └── ErrorHandlerFactory.java │ │ │ ├── event │ │ │ ├── ErrorEvent.java │ │ │ ├── EventListenerSupport.java │ │ │ ├── EventListenerSupportImpl.java │ │ │ ├── NamedEventListenerSupport.java │ │ │ ├── NamedEventListenerSupportImpl.java │ │ │ ├── SCEvent.java │ │ │ └── SCListener.java │ │ │ ├── exception │ │ │ ├── AbortionException.java │ │ │ ├── AppException.java │ │ │ ├── CommandNotFoundException.java │ │ │ ├── IllegalConfigException.java │ │ │ └── SystemException.java │ │ │ ├── io │ │ │ ├── ArrayCsvReader.java │ │ │ ├── ArrayCsvWriter.java │ │ │ └── CsvSupport.java │ │ │ ├── menu │ │ │ ├── CommandMenuItem.java │ │ │ ├── ContextMenu.java │ │ │ ├── ContextMenuManager.java │ │ │ ├── IMenu.java │ │ │ ├── IParentMenu.java │ │ │ ├── MainMenuItems.java │ │ │ ├── ParentMenu.java │ │ │ └── ToolBarItems.java │ │ │ ├── modular │ │ │ ├── JarLoader.java │ │ │ ├── Module.java │ │ │ ├── ModuleEntryPoint.java │ │ │ ├── ModuleEntryPointBase.java │ │ │ ├── ModuleManager.java │ │ │ └── ModuleManifest.java │ │ │ ├── preference │ │ │ ├── PrefButtonGroup.java │ │ │ ├── PrefCheckBox.java │ │ │ ├── PrefPage.java │ │ │ ├── PrefSelectBox.java │ │ │ ├── PrefTextField.java │ │ │ ├── PrefTextValidator.java │ │ │ ├── PrefTitleLabel.java │ │ │ ├── PrefUtils.java │ │ │ ├── PreferenceManager.java │ │ │ └── PreferencesDialog.java │ │ │ ├── selector │ │ │ ├── AllSelector.java │ │ │ ├── AndSelector.java │ │ │ ├── CssSelector.java │ │ │ ├── FocusOwnerSelector.java │ │ │ ├── NotSelector.java │ │ │ ├── OrSelector.java │ │ │ ├── PseudoClassSelector.java │ │ │ ├── SelectorFactory.java │ │ │ ├── StyleClassSelector.java │ │ │ └── TypeSelector.java │ │ │ ├── setting │ │ │ ├── SCProperties.java │ │ │ ├── Session.java │ │ │ └── Settings.java │ │ │ └── util │ │ │ ├── DigestUtils.java │ │ │ ├── DirectoryResolver.java │ │ │ ├── ImageUtils.java │ │ │ ├── InvocationUtils.java │ │ │ ├── KeyStrokeUtils.java │ │ │ ├── MessageBundles.java │ │ │ ├── PlatformUtils.java │ │ │ ├── SCBundle.java │ │ │ ├── SCPropertiesFileUtils.java │ │ │ └── SingletonInstanceManager.java │ └── resources │ │ ├── com │ │ └── smoothcsv │ │ │ └── framework │ │ │ └── component │ │ │ └── dialog │ │ │ ├── DialogOperation.properties │ │ │ └── DialogOperation_ja.properties │ │ ├── img │ │ └── progress.gif │ │ ├── message.properties │ │ └── message_ja.properties │ └── test │ └── java │ ├── file.csv │ └── file.prefs ├── smoothcsv-launcher-mac ├── SmoothCSV.icns ├── build.gradle └── src │ └── main │ ├── java │ └── com │ │ └── smoothcsv │ │ └── SmoothCSV.java │ └── resources │ └── logback.xml ├── smoothcsv-launcher-win ├── build-installer-x64.iss ├── build-installer-x86.iss ├── build.gradle └── src │ └── main │ ├── java │ └── com │ │ └── smoothcsv │ │ └── SmoothCSV.java │ └── resources │ ├── app.ico │ └── logback.xml ├── smoothcsv-swing ├── README.md ├── build.gradle └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── smoothcsv │ │ │ └── swing │ │ │ ├── action │ │ │ └── SimpleAction.java │ │ │ ├── components │ │ │ ├── AnchorLabel.java │ │ │ ├── AwesomeIconButton.java │ │ │ ├── AwesomeIconToggleButton.java │ │ │ ├── ExButtonGroup.java │ │ │ ├── ExLabel.java │ │ │ ├── ExRadioButton.java │ │ │ ├── ExSplitPane.java │ │ │ ├── ExTextArea.java │ │ │ ├── ExTextField.java │ │ │ ├── History.java │ │ │ ├── HistoryTextBox.java │ │ │ ├── LineBreakableTextField.java │ │ │ ├── LinkLabel.java │ │ │ ├── PlainLabel.java │ │ │ ├── ReadOnlyTable.java │ │ │ ├── RegulatedTextField.java │ │ │ ├── RoundedToggleButton.java │ │ │ └── text │ │ │ │ ├── EditOriginalBoxView.java │ │ │ │ ├── EditOriginalLabelView.java │ │ │ │ ├── EditOriginalParagraphView.java │ │ │ │ ├── EditOriginalViewFactory.java │ │ │ │ ├── EditorPanel.java │ │ │ │ ├── ExTextPane.java │ │ │ │ └── ExTextPaneConfig.java │ │ │ ├── constants │ │ │ └── TableOrientation.java │ │ │ ├── event │ │ │ ├── HoveredCellChangeEvent.java │ │ │ └── TableCellHoverListener.java │ │ │ ├── gridsheet │ │ │ ├── AbstractGridSheetComponent.java │ │ │ ├── AbstractGridSheetHeaderComponent.java │ │ │ ├── CellIterator.java │ │ │ ├── GridSheetCellEditor.java │ │ │ ├── GridSheetCellStringEditor.java │ │ │ ├── GridSheetColumnHeader.java │ │ │ ├── GridSheetCornerHeader.java │ │ │ ├── GridSheetLayerUI.java │ │ │ ├── GridSheetPane.java │ │ │ ├── GridSheetPrintable.java │ │ │ ├── GridSheetRowHeader.java │ │ │ ├── GridSheetScrollPane.java │ │ │ ├── GridSheetScrollPaneConstants.java │ │ │ ├── GridSheetTable.java │ │ │ ├── GridSheetUtils.java │ │ │ ├── GridSheetViewport.java │ │ │ ├── event │ │ │ │ ├── GridSheetColumnHeaderSelectionListener.java │ │ │ │ ├── GridSheetColumnModelEvent.java │ │ │ │ ├── GridSheetCornerHeaderSelectionListener.java │ │ │ │ ├── GridSheetDataEvent.java │ │ │ │ ├── GridSheetFocusEvent.java │ │ │ │ ├── GridSheetFocusListener.java │ │ │ │ ├── GridSheetHeaderSelectionEvent.java │ │ │ │ ├── GridSheetHeaderSelectionListener.java │ │ │ │ ├── GridSheetModelEvent.java │ │ │ │ ├── GridSheetModelListener.java │ │ │ │ ├── GridSheetRowHeaderSelectionListener.java │ │ │ │ ├── GridSheetRowModelEvent.java │ │ │ │ ├── GridSheetSelectionEvent.java │ │ │ │ ├── GridSheetSelectionListener.java │ │ │ │ └── GridSheetStructureEvent.java │ │ │ ├── model │ │ │ │ ├── CellConsumer.java │ │ │ │ ├── CellRect.java │ │ │ │ ├── DefaultGridSheetSelectionModel.java │ │ │ │ ├── GridSheetCell.java │ │ │ │ ├── GridSheetCellRange.java │ │ │ │ ├── GridSheetColumn.java │ │ │ │ ├── GridSheetModel.java │ │ │ │ ├── GridSheetRow.java │ │ │ │ ├── GridSheetSelectionInterval.java │ │ │ │ ├── GridSheetSelectionModel.java │ │ │ │ ├── GridSheetSelectionSnapshot.java │ │ │ │ ├── GridSheetStructure.java │ │ │ │ ├── IGridSheetData.java │ │ │ │ ├── IGridSheetModel.java │ │ │ │ └── IGridSheetStructure.java │ │ │ ├── renderer │ │ │ │ ├── DefaultGridSheetCellRenderer.java │ │ │ │ ├── DefaultGridSheetColorProvider.java │ │ │ │ ├── DefaultGridSheetHeaderCellRenderer.java │ │ │ │ ├── DefaultGridSheetRowHeaderRenderer.java │ │ │ │ ├── GridSheetCellRenderer.java │ │ │ │ ├── GridSheetColorProvider.java │ │ │ │ └── GridSheetHeaderRenderer.java │ │ │ └── ui │ │ │ │ ├── AbstractGridUI.java │ │ │ │ ├── GridSheetColumnHeaderUI.java │ │ │ │ ├── GridSheetRowHeaderUI.java │ │ │ │ ├── GridSheetTableNoActionUI.java │ │ │ │ └── GridSheetTableUI.java │ │ │ ├── icon │ │ │ ├── AwesomeIcon.java │ │ │ └── AwesomeIconConstants.java │ │ │ ├── model │ │ │ └── FilteredListModel.java │ │ │ ├── table │ │ │ ├── CheckBoxCellEditorRenderer.java │ │ │ ├── ComboBoxCellEditorRenderer.java │ │ │ ├── DefaultTableCellValueExtracter.java │ │ │ ├── ExTable.java │ │ │ ├── ExTableCellValueExtracter.java │ │ │ ├── ExTableColumn.java │ │ │ ├── ExTableModel.java │ │ │ ├── ExTableNoSelecteionModel.java │ │ │ ├── ExTableRowFilter.java │ │ │ └── ReadOnlyExTableCellValueExtracter.java │ │ │ └── utils │ │ │ ├── ClipboardUtils.java │ │ │ ├── DebugUtils.java │ │ │ ├── ExBasicTransferable.java │ │ │ ├── FontUtils.java │ │ │ ├── JTreeUtils.java │ │ │ └── SwingUtils.java │ └── resources │ │ └── font-awesome-4.7.0 │ │ ├── css │ │ ├── font-awesome.css │ │ └── font-awesome.min.css │ │ └── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ └── test │ └── java │ └── com │ └── smoothcsv │ └── swing │ └── components │ └── grid │ └── GridTest.java ├── smoothcsv_icon.sketch └── update_version.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Gradle 2 | .gradle 3 | !gradle/wrapper/gradle-wrapper.jar 4 | 5 | # Build output directies 6 | /target/ 7 | /*/target/ 8 | /*/*/target/ 9 | /build/ 10 | /*/build/ 11 | /*/*/build/ 12 | /out/ 13 | /*/out/ 14 | /*/*/out/ 15 | 16 | # IntelliJ IDEA 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | /out/ 22 | /*/out/ 23 | 24 | # Eclipse 25 | .classpath 26 | .project 27 | .settings/ 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | SmoothCSV 2 2 | ================ 3 | 4 | SmoothCSV is a powerful CSV editor for macOS and Windows. 5 | This is a 2.x version of the software. 6 | 7 | > [!WARNING] 8 | > SmoothCSV 2.x is no longer maintained. 9 | 10 | > [!NOTE] 11 | > SmoothCSV 3.x is available at https://github.com/kohii/smoothcsv3. 12 | > It is a complete rewrite in web technologies (Tauri, TypeScript, Rust, etc.). 13 | -------------------------------------------------------------------------------- /build_all.command: -------------------------------------------------------------------------------- 1 | cd `dirname $0` 2 | set -eu 3 | 4 | ./build_icons.command 5 | 6 | cd ../smoothcsv 7 | ./gradlew clean build 8 | 9 | -------------------------------------------------------------------------------- /build_icons.command: -------------------------------------------------------------------------------- 1 | set -eu 2 | cd `dirname $0` 3 | 4 | export PATH=/Applications/Sketch.app/Contents/Resources/sketchtool/bin:$PATH 5 | 6 | WORK_DIR=icon_work 7 | if [ -d "$WORK_DIR" ]; then 8 | rm -rf "$WORK_DIR" 9 | fi 10 | 11 | mkdir "$WORK_DIR" 12 | cd "$WORK_DIR" 13 | 14 | mkdir icons 15 | sketchtool export slices ../smoothcsv_icon.sketch --output=icons 16 | 17 | # common 18 | cp icons/* ../smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/ 19 | 20 | # macOS 21 | mkdir SmoothCSV.iconset 22 | cp icons/* SmoothCSV.iconset/ 23 | iconutil -c icns SmoothCSV.iconset 24 | mv SmoothCSV.icns ../smoothcsv-launcher-mac/ 25 | 26 | # Windows 27 | convert icons/icon_512x512.png -define icon:auto-resize app.ico 28 | cp app.ico ../smoothcsv-launcher-win/src/main/resources/ -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.parallel=true -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Jan 30 22:26:13 JST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip 7 | -------------------------------------------------------------------------------- /icon_work/SmoothCSV.iconset/icon16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/SmoothCSV.iconset/icon16x16.png -------------------------------------------------------------------------------- /icon_work/SmoothCSV.iconset/icon16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/SmoothCSV.iconset/icon16x16@2x.png -------------------------------------------------------------------------------- /icon_work/SmoothCSV.iconset/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/SmoothCSV.iconset/icon_128x128.png -------------------------------------------------------------------------------- /icon_work/SmoothCSV.iconset/icon_128x128@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/SmoothCSV.iconset/icon_128x128@2.png -------------------------------------------------------------------------------- /icon_work/SmoothCSV.iconset/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/SmoothCSV.iconset/icon_256x256.png -------------------------------------------------------------------------------- /icon_work/SmoothCSV.iconset/icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/SmoothCSV.iconset/icon_256x256@2x.png -------------------------------------------------------------------------------- /icon_work/SmoothCSV.iconset/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/SmoothCSV.iconset/icon_32x32.png -------------------------------------------------------------------------------- /icon_work/SmoothCSV.iconset/icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/SmoothCSV.iconset/icon_32x32@2x.png -------------------------------------------------------------------------------- /icon_work/SmoothCSV.iconset/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/SmoothCSV.iconset/icon_512x512.png -------------------------------------------------------------------------------- /icon_work/SmoothCSV.iconset/icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/SmoothCSV.iconset/icon_512x512@2x.png -------------------------------------------------------------------------------- /icon_work/app.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/app.ico -------------------------------------------------------------------------------- /icon_work/icons/icon16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/icons/icon16x16.png -------------------------------------------------------------------------------- /icon_work/icons/icon16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/icons/icon16x16@2x.png -------------------------------------------------------------------------------- /icon_work/icons/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/icons/icon_128x128.png -------------------------------------------------------------------------------- /icon_work/icons/icon_128x128@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/icons/icon_128x128@2.png -------------------------------------------------------------------------------- /icon_work/icons/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/icons/icon_256x256.png -------------------------------------------------------------------------------- /icon_work/icons/icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/icons/icon_256x256@2x.png -------------------------------------------------------------------------------- /icon_work/icons/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/icons/icon_32x32.png -------------------------------------------------------------------------------- /icon_work/icons/icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/icons/icon_32x32@2x.png -------------------------------------------------------------------------------- /icon_work/icons/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/icons/icon_512x512.png -------------------------------------------------------------------------------- /icon_work/icons/icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/icon_work/icons/icon_512x512@2x.png -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'smoothcsv' 2 | include(':smoothcsv-commons') 3 | include(':smoothcsv-swing') 4 | include(':smoothcsv-framework') 5 | include(':smoothcsv-app-modules:smoothcsv-core') 6 | include(':smoothcsv-app-modules:smoothcsv-debug') 7 | include(':smoothcsv-app-modules:smoothcsv-windows') 8 | include(':smoothcsv-app-modules:smoothcsv-ja') 9 | include(':smoothcsv-app-modules:smoothcsv-mac') 10 | include(':smoothcsv-app-modules') 11 | include(':smoothcsv-launcher-mac') 12 | include(':smoothcsv-debuglauncher-mac') 13 | include(':smoothcsv-launcher-win') 14 | project(':smoothcsv-app-modules:smoothcsv-core').projectDir = file('smoothcsv-app-modules/smoothcsv-core') 15 | project(':smoothcsv-app-modules:smoothcsv-debug').projectDir = file('smoothcsv-app-modules/smoothcsv-debug') 16 | project(':smoothcsv-app-modules:smoothcsv-windows').projectDir = file('smoothcsv-app-modules/smoothcsv-windows') 17 | project(':smoothcsv-app-modules:smoothcsv-ja').projectDir = file('smoothcsv-app-modules/smoothcsv-ja') 18 | project(':smoothcsv-app-modules:smoothcsv-mac').projectDir = file('smoothcsv-app-modules/smoothcsv-mac') 19 | 20 | includeBuild '../smoothcsv-rw' -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/build.gradle: -------------------------------------------------------------------------------- 1 | import org.apache.tools.ant.filters.ReplaceTokens 2 | 3 | apply plugin: 'java-library' 4 | 5 | dependencies { 6 | compile 'org.mozilla:rhino:1.7.12' 7 | compile 'com.fifesoft:rsyntaxtextarea:3.1.1' 8 | compile 'com.fifesoft:autocomplete:3.1.0' 9 | compile 'com.fifesoft:languagesupport:3.1.0' 10 | compile 'com.h2database:h2:1.4.199' 11 | compile 'com.github.jsqlparser:jsqlparser:1.2' 12 | compile project(':smoothcsv-framework') 13 | } 14 | 15 | processResources { 16 | filesMatching('**/application.properties') { 17 | filter( 18 | ReplaceTokens, 19 | tokens: [ 20 | 'project.version': project.version 21 | ] 22 | ) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/ApplicationStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core; 15 | 16 | import lombok.Getter; 17 | import lombok.Setter; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | @Getter 23 | @Setter 24 | public class ApplicationStatus { 25 | 26 | @Getter 27 | private static ApplicationStatus instance = new ApplicationStatus(); 28 | 29 | private boolean findAndReplacePanelVisible = false; 30 | } 31 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/celleditor/SCTextPane.java: -------------------------------------------------------------------------------- 1 | package com.smoothcsv.core.celleditor; 2 | 3 | import java.awt.event.ActionEvent; 4 | 5 | import javax.swing.Action; 6 | import javax.swing.ActionMap; 7 | 8 | import com.smoothcsv.framework.component.support.SmoothComponent; 9 | import com.smoothcsv.framework.component.support.SmoothComponentSupport; 10 | import com.smoothcsv.swing.components.text.ExTextPane; 11 | import com.smoothcsv.swing.components.text.ExTextPaneConfig; 12 | import lombok.Getter; 13 | 14 | /** 15 | * @author kohii 16 | */ 17 | public class SCTextPane extends ExTextPane implements SmoothComponent { 18 | 19 | @Getter 20 | private final SmoothComponentSupport componentSupport; 21 | 22 | private final ActionMap originalAm; 23 | 24 | public SCTextPane(String componentTypeName, ExTextPaneConfig config) { 25 | super(config); 26 | this.originalAm = getActionMap(); 27 | this.componentSupport = new SmoothComponentSupport(this, componentTypeName); 28 | } 29 | 30 | public void invokeOriginalAction(String key) { 31 | ActionEvent e = new ActionEvent(this, 0, key); 32 | Action action = originalAm.get(key); 33 | action.actionPerformed(e); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/command/CellEditorCommandBase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.command; 15 | 16 | import com.smoothcsv.core.csvsheet.CsvGridSheetCellStringEditor.CsvGridEditorComponent; 17 | import com.smoothcsv.core.csvsheet.CsvGridSheetPane; 18 | 19 | public abstract class CellEditorCommandBase extends GridCommand { 20 | 21 | @Override 22 | public final void run(CsvGridSheetPane gridSheet) { 23 | run((CsvGridEditorComponent) gridSheet.getTable().getCellEditor().getEditorComponent()); 24 | } 25 | 26 | public abstract void run(CsvGridEditorComponent editorComponent); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/command/GridCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.command; 15 | 16 | import com.smoothcsv.core.csvsheet.CsvGridSheetPane; 17 | import com.smoothcsv.core.csvsheet.CsvSheetView; 18 | 19 | public abstract class GridCommand extends CsvSheetCommandBase { 20 | 21 | @Override 22 | public final void run(CsvSheetView view) { 23 | CsvGridSheetPane gridSheet = view.getGridSheetPane(); 24 | run(gridSheet); 25 | } 26 | 27 | public abstract void run(CsvGridSheetPane gridSheetPane); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/command/SqlEditorCommandBase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.command; 15 | 16 | import com.smoothcsv.core.sql.component.SqlEditor; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public abstract class SqlEditorCommandBase extends VisibleComponentCommandBase { 22 | 23 | public SqlEditorCommandBase() { 24 | super("sql-editor"); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/command/SqlTableListCommandBase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.command; 15 | 16 | import com.smoothcsv.core.sql.component.SqlTableList; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public abstract class SqlTableListCommandBase extends VisibleComponentCommandBase { 22 | 23 | /** 24 | * @param cssSelector 25 | */ 26 | public SqlTableListCommandBase() { 27 | super("sql-tablelist"); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/command/ValuePanelCommandBase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.command; 15 | 16 | import com.smoothcsv.core.csvsheet.CsvGridSheetCellValuePanel; 17 | import com.smoothcsv.framework.command.Command; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public abstract class ValuePanelCommandBase extends Command { 23 | 24 | @Override 25 | public final void run() { 26 | CsvGridSheetCellValuePanel valuePanel = CsvGridSheetCellValuePanel.getInstance(); 27 | if (!valuePanel.isValuePanelVisible()) { 28 | abort(); 29 | } 30 | run(valuePanel); 31 | } 32 | 33 | protected abstract void run(CsvGridSheetCellValuePanel valuePanel); 34 | } 35 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/component/CsvReadOptionPanel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.component; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public class CsvReadOptionPanel { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/constants/UIConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.constants; 15 | 16 | import java.awt.Color; 17 | import java.awt.Font; 18 | 19 | import javax.swing.JPanel; 20 | 21 | import lombok.Getter; 22 | 23 | /** 24 | * @author kohii 25 | */ 26 | public class UIConstants { 27 | 28 | private static final JPanel basicPanel = new JPanel(); 29 | 30 | @Getter 31 | private static Color defaultBorderColor = Color.LIGHT_GRAY; 32 | 33 | @Getter 34 | private static Color defaultBgColor = basicPanel.getBackground(); 35 | 36 | @Getter 37 | private static Font defaultFont = basicPanel.getFont(); 38 | } 39 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/csv/RecentFilesHistory.java: -------------------------------------------------------------------------------- 1 | package com.smoothcsv.core.csv; 2 | 3 | import java.io.File; 4 | 5 | import com.smoothcsv.framework.util.DirectoryResolver; 6 | import com.smoothcsv.swing.components.History; 7 | import lombok.Getter; 8 | 9 | /** 10 | * @author kohii 11 | */ 12 | public class RecentFilesHistory extends History { 13 | 14 | @Getter 15 | private static final RecentFilesHistory instance = new RecentFilesHistory(); 16 | 17 | private RecentFilesHistory() { 18 | super(new File(DirectoryResolver.instance().getSessionDirectory(), "recent_files.history"), false, 20); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/csvsheet/edits/ChangePropertyEdit.java: -------------------------------------------------------------------------------- 1 | package com.smoothcsv.core.csvsheet.edits; 2 | 3 | import com.smoothcsv.core.csv.CsvMeta; 4 | import com.smoothcsv.core.csvsheet.CsvGridSheetPane; 5 | import lombok.RequiredArgsConstructor; 6 | 7 | /** 8 | * @author kohii 9 | */ 10 | @RequiredArgsConstructor 11 | public class ChangePropertyEdit implements GridSheetUndoableEdit { 12 | 13 | private final CsvMeta oldCsvMeta; 14 | private final CsvMeta newCsvMeta; 15 | 16 | @Override 17 | public void undo(CsvGridSheetPane gridSheetPane) { 18 | gridSheetPane.getCsvSheetView().getViewInfo().setCsvMeta(oldCsvMeta); 19 | } 20 | 21 | @Override 22 | public void redo(CsvGridSheetPane gridSheetPane) { 23 | gridSheetPane.getCsvSheetView().getViewInfo().setCsvMeta(newCsvMeta); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/csvsheet/edits/DummyEdit.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.csvsheet.edits; 15 | 16 | import com.smoothcsv.core.csvsheet.CsvGridSheetModel; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public class DummyEdit implements GridSheetModelUndoableEdit { 22 | 23 | @Override 24 | public void undo(CsvGridSheetModel model) {} 25 | 26 | @Override 27 | public void redo(CsvGridSheetModel model) {} 28 | 29 | } 30 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/csvsheet/edits/GridSheetEditContainer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.csvsheet.edits; 15 | 16 | import com.smoothcsv.core.csvsheet.CsvGridSheetPane; 17 | import com.smoothcsv.swing.gridsheet.model.GridSheetSelectionSnapshot; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public interface GridSheetEditContainer { 23 | 24 | GridSheetSelectionSnapshot getSelection(); 25 | 26 | void undo(CsvGridSheetPane gridSheetPane); 27 | 28 | void redo(CsvGridSheetPane gridSheetPane); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/csvsheet/edits/GridSheetUndoableEdit.java: -------------------------------------------------------------------------------- 1 | package com.smoothcsv.core.csvsheet.edits; 2 | 3 | import com.smoothcsv.core.csvsheet.CsvGridSheetPane; 4 | 5 | /** 6 | * @author kohii 7 | */ 8 | public interface GridSheetUndoableEdit { 9 | 10 | void undo(CsvGridSheetPane gridSheetPane); 11 | 12 | void redo(CsvGridSheetPane gridSheetPane); 13 | } 14 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/csvsheet/edits/ToggleHeaderRowEdit.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.csvsheet.edits; 15 | 16 | import com.smoothcsv.core.csvsheet.CsvGridSheetModel; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public class ToggleHeaderRowEdit implements GridSheetModelUndoableEdit { 22 | 23 | @Override 24 | public void undo(CsvGridSheetModel model) { 25 | model.setUseFirstRowAsHeader(!model.usesFirstRowAsHeader()); 26 | } 27 | 28 | @Override 29 | public void redo(CsvGridSheetModel model) { 30 | model.setUseFirstRowAsHeader(!model.usesFirstRowAsHeader()); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/macro/MacroException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.macro; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public class MacroException extends RuntimeException { 20 | 21 | private static final long serialVersionUID = 288345837664229467L; 22 | 23 | public MacroException(String message) { 24 | super(message); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/macro/SCAppMacroRuntime.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.macro; 15 | 16 | 17 | /** 18 | * @author kohii 19 | */ 20 | public class SCAppMacroRuntime extends MacroRuntime { 21 | 22 | private static SCAppMacroRuntime macroRuntime = new SCAppMacroRuntime(); 23 | 24 | public static SCAppMacroRuntime getMacroRuntime() { 25 | return macroRuntime; 26 | } 27 | 28 | @Override 29 | public Object execute(Macro macro) { 30 | ensureStarted(); 31 | return super.execute(macro); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/macro/api/CellEditor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.macro.api; 15 | 16 | public interface CellEditor { 17 | 18 | /** 19 | * Input a text into the cell. 20 | * 21 | * @param text the text to be input 22 | * @return true if succeeded 23 | */ 24 | boolean type(String text); 25 | } 26 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/macro/api/CellVisitor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.macro.api; 15 | 16 | /** 17 | * Callback function for {@link Range#forEach(CellVisitor)}. 18 | */ 19 | public interface CellVisitor { 20 | 21 | /** 22 | * @param cell A cell 23 | * @param value A cell value 24 | * @param row row number 25 | * @param column row number 26 | * @return false to break 27 | */ 28 | Object call(Range cell, String value, int row, int column); 29 | } 30 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/macro/api/Command.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.macro.api; 15 | 16 | import com.smoothcsv.core.macro.apiimpl.APIBase; 17 | import com.smoothcsv.framework.command.CommandRegistry; 18 | 19 | public class Command extends APIBase { 20 | 21 | private Command() {} 22 | 23 | /** 24 | * Runs the given command. 25 | * 26 | * @param id the command id to run 27 | * @return true if the command was successfully executed 28 | */ 29 | public static boolean run(String id) { 30 | return CommandRegistry.instance().runCommand(id); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/macro/api/Console.java: -------------------------------------------------------------------------------- 1 | package com.smoothcsv.core.macro.api; 2 | 3 | import com.smoothcsv.core.macro.apiimpl.APIBase; 4 | import com.smoothcsv.core.macro.bridge.ConsoleBridge; 5 | 6 | /** 7 | * The Console object provides access to the SmoothCSV's debugging console. 8 | * 9 | * @author kohii 10 | */ 11 | public class Console extends APIBase { 12 | 13 | /** 14 | * Outputs a message to the console. 15 | * 16 | * @param objs A list of objects to output. 17 | * The string representations of each of these objects are appended together in the order listed and output. 18 | */ 19 | public void log(Object... objs) { 20 | ConsoleBridge.log(objs); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/macro/apiimpl/APIBase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.macro.apiimpl; 15 | 16 | 17 | /** 18 | * @author kohii 19 | */ 20 | public class APIBase { 21 | 22 | @Override 23 | public String toString() { 24 | String name = getClass().getSimpleName(); 25 | if (name.endsWith("Impl")) { 26 | name = name.substring(0, name.length() - 4); 27 | } 28 | return "[object " + name + "]"; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/menu/OpenFileMenuItem.java: -------------------------------------------------------------------------------- 1 | package com.smoothcsv.core.menu; 2 | 3 | import java.awt.event.ActionEvent; 4 | import java.io.File; 5 | import java.io.IOException; 6 | 7 | import javax.swing.JMenuItem; 8 | 9 | import command.app.OpenFileCommand; 10 | 11 | /** 12 | * @author kohii 13 | */ 14 | public class OpenFileMenuItem extends JMenuItem { 15 | 16 | private final File file; 17 | 18 | public OpenFileMenuItem(File file) { 19 | this.file = file; 20 | 21 | String pathname; 22 | try { 23 | pathname = file.getCanonicalPath(); 24 | } catch (IOException e) { 25 | pathname = "[UNKNOWN]"; 26 | } 27 | setText(pathname); 28 | } 29 | 30 | @Override 31 | protected void fireActionPerformed(ActionEvent event) { 32 | new OpenFileCommand().run(file); 33 | } 34 | } -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/menu/RunMacroMenuItem.java: -------------------------------------------------------------------------------- 1 | package com.smoothcsv.core.menu; 2 | 3 | import java.awt.event.ActionEvent; 4 | import java.io.File; 5 | import java.io.IOException; 6 | 7 | import javax.swing.JMenuItem; 8 | 9 | import com.smoothcsv.core.macro.Macro; 10 | import com.smoothcsv.core.macro.SCAppMacroRuntime; 11 | 12 | /** 13 | * @author kohii 14 | */ 15 | public class RunMacroMenuItem extends JMenuItem { 16 | 17 | private final File file; 18 | 19 | public RunMacroMenuItem(File file) { 20 | this.file = file; 21 | 22 | String pathname; 23 | try { 24 | pathname = file.getCanonicalPath(); 25 | } catch (IOException e) { 26 | pathname = "[UNKNOWN]"; 27 | } 28 | setText(pathname); 29 | } 30 | 31 | @Override 32 | protected void fireActionPerformed(ActionEvent event) { 33 | Macro macro = new Macro(file); 34 | SCAppMacroRuntime.getMacroRuntime().execute(macro); 35 | } 36 | } -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/preference/EditorPrefPanel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.preference; 15 | 16 | import javax.swing.BoxLayout; 17 | import javax.swing.JPanel; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | @SuppressWarnings("serial") 23 | public class EditorPrefPanel extends JPanel { 24 | 25 | public EditorPrefPanel() { 26 | setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); 27 | 28 | add(new FileEditorPrefPanel()); 29 | add(new EditEditorPrefPanel()); 30 | add(new AppearenceEditorPrefPanel()); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/sort/BlanksOption.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.sort; 15 | 16 | import com.smoothcsv.commons.utils.EnumStringSupport; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public enum BlanksOption { 22 | BLANKS_FIRST, BLANKS_LAST, DEFAULT; 23 | 24 | @Override 25 | public String toString() { 26 | return EnumStringSupport.getString(this); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/sort/Order.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.sort; 15 | 16 | import com.smoothcsv.commons.utils.EnumStringSupport; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public enum Order { 22 | ASCENDING, DESCENDING; 23 | 24 | @Override 25 | public String toString() { 26 | return EnumStringSupport.getString(this); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/sort/SortCriteria.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.sort; 15 | 16 | import lombok.Getter; 17 | import lombok.Setter; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | @Getter 23 | @Setter 24 | public class SortCriteria { 25 | 26 | private int column; 27 | private ValueType type = ValueType.STRING; 28 | private Order order = Order.ASCENDING; 29 | private BlanksOption blanksOption = BlanksOption.DEFAULT; 30 | 31 | public SortCriteria() {} 32 | 33 | public SortCriteria(int column) { 34 | this.column = column; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/sort/ValueType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.sort; 15 | 16 | import com.smoothcsv.commons.utils.EnumStringSupport; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public enum ValueType { 22 | STRING, NUMBER; 23 | 24 | @Override 25 | public String toString() { 26 | return EnumStringSupport.getString(this); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/sql/component/SqlComponentConstants.java: -------------------------------------------------------------------------------- 1 | package com.smoothcsv.core.sql.component; 2 | 3 | import java.awt.Color; 4 | 5 | import com.smoothcsv.swing.icon.AwesomeIcon; 6 | import com.smoothcsv.swing.icon.AwesomeIconConstants; 7 | 8 | /** 9 | * @author kohii 10 | */ 11 | public class SqlComponentConstants { 12 | 13 | public static final AwesomeIcon TABLE_ICON = AwesomeIcon.create(AwesomeIconConstants.FA_TABLE, Color.decode("#888888")); 14 | 15 | public static final AwesomeIcon SQL_INSERT_TEXT_ICON = AwesomeIcon.create(AwesomeIconConstants.FA_ANGLE_DOUBLE_RIGHT, Color.decode("#cccccc")); 16 | public static final AwesomeIcon SQL_INSERT_TEXT_ICON_HOVER = AwesomeIcon.create(AwesomeIconConstants.FA_ANGLE_DOUBLE_RIGHT, Color.decode("#3c7565")); 17 | public static final AwesomeIcon SQL_INSERT_TEXT_ICON_SELECTED_HOVER = AwesomeIcon.create(AwesomeIconConstants.FA_ANGLE_DOUBLE_RIGHT, Color.decode("#adeddb")); 18 | 19 | public static final Color HOVERED_CELL_BACKGROUND = Color.decode("#f4f4f4"); 20 | public static final Color SELECTED_CELL_BACKGROUND = Color.decode("#116CD6"); 21 | } 22 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/sql/model/SqlTableInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.sql.model; 15 | 16 | import java.util.List; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public interface SqlTableInfo { 22 | 23 | String getName(); 24 | 25 | List getColumns(); 26 | } 27 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/update/UpdateSettings.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.update; 15 | 16 | import com.smoothcsv.framework.setting.Settings; 17 | import lombok.Getter; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class UpdateSettings extends Settings { 23 | 24 | public static final String LAST_CHOICE = "lastChoice"; 25 | public static final String LAST_VERSION = "lastVersion"; 26 | public static final String LAST_CHECKED = "lastChecked"; 27 | 28 | @Getter 29 | private static UpdateSettings instance = new UpdateSettings(); 30 | 31 | private UpdateSettings() { 32 | super("update"); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/util/AppUtils.java: -------------------------------------------------------------------------------- 1 | package com.smoothcsv.core.util; 2 | 3 | import java.util.ResourceBundle; 4 | 5 | /** 6 | * @author kohii 7 | */ 8 | public class AppUtils { 9 | 10 | public static String createUrl(String path) { 11 | if (path.startsWith("/")) { 12 | throw new IllegalArgumentException(path); 13 | } 14 | ResourceBundle bundle = ResourceBundle.getBundle("application"); 15 | String url = bundle.getString("site.url"); 16 | return url + (url.endsWith("/") ? "" : "/") + path; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/com/smoothcsv/core/util/CoreBundle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.core.util; 15 | 16 | import java.util.ResourceBundle; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public class CoreBundle { 22 | 23 | private static ResourceBundle bundle = ResourceBundle.getBundle("smoothcsv-core.bundle"); 24 | 25 | public static String get(String key) { 26 | return bundle.getString(key); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/app/AboutCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.app; 15 | 16 | import com.smoothcsv.core.component.AboutDialog; 17 | import com.smoothcsv.framework.command.Command; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class AboutCommand extends Command { 23 | 24 | @Override 25 | public void run() { 26 | AboutDialog dialog = new AboutDialog(); 27 | dialog.pack(); 28 | dialog.setLocationRelativeTo(dialog.getParent()); 29 | dialog.setVisible(true); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/app/OpenFileAsCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.app; 15 | 16 | import com.smoothcsv.framework.command.Command; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public class OpenFileAsCommand extends Command { 22 | 23 | @Override 24 | public void run() { 25 | new OpenFileCommand().chooseAndOpenFile(null, OpenFileCommand.HOW_TO_DETECT_PROPERTIES_MANUAL); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/app/QuitCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.app; 15 | 16 | import com.smoothcsv.framework.SCApplication; 17 | import com.smoothcsv.framework.command.Command; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class QuitCommand extends Command { 23 | 24 | @Override 25 | public void run() { 26 | SCApplication.getApplication().exit(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/app/ReloadAsCommand.java: -------------------------------------------------------------------------------- 1 | package command.app; 2 | 3 | import com.smoothcsv.core.command.CsvSheetCommandBase; 4 | import com.smoothcsv.core.csv.CsvMeta; 5 | import com.smoothcsv.core.csvsheet.CsvSheetView; 6 | import com.smoothcsv.framework.SCApplication; 7 | 8 | /** 9 | * @author kohii 10 | */ 11 | public class ReloadAsCommand extends CsvSheetCommandBase { 12 | 13 | @Override 14 | public void run(CsvSheetView view) { 15 | int pos = SCApplication.components().getTabbedPane().indexOfComponent(view); 16 | CloseCommand.beforeClose(view, true); 17 | CsvMeta properties = OpenFileCommand.chooseProperties(); 18 | 19 | OpenFileCommand.determineCsvMetaContent(view.getViewInfo().getFile(), properties); 20 | 21 | CloseCommand.close(view, false); 22 | OpenFileCommand.run(view.getViewInfo().getFile(), properties, view.getViewInfo().getOptions(), pos); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/app/ReloadCommand.java: -------------------------------------------------------------------------------- 1 | package command.app; 2 | 3 | import com.smoothcsv.core.command.CsvSheetCommandBase; 4 | import com.smoothcsv.core.csvsheet.CsvSheetView; 5 | import com.smoothcsv.framework.SCApplication; 6 | 7 | /** 8 | * @author kohii 9 | */ 10 | public class ReloadCommand extends CsvSheetCommandBase { 11 | 12 | @Override 13 | public void run(CsvSheetView view) { 14 | int pos = SCApplication.components().getTabbedPane().indexOfComponent(view); 15 | CloseCommand.close(view); 16 | OpenFileCommand.run(view.getViewInfo().getFile(), 17 | view.getViewInfo().getCsvMeta(), 18 | view.getViewInfo().getOptions(), 19 | pos); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/app/ShowSqlToolsCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.app; 15 | 16 | import com.smoothcsv.core.sql.component.SqlToolsDialog; 17 | import com.smoothcsv.core.sql.model.SqlTableDefinitions; 18 | import com.smoothcsv.framework.command.Command; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | public class ShowSqlToolsCommand extends Command { 24 | 25 | private static SqlToolsDialog dialog; 26 | 27 | @Override 28 | public void run() { 29 | SqlTableDefinitions.getInstance().reloadAllCsvSheets(); 30 | 31 | if (dialog == null) { 32 | dialog = new SqlToolsDialog(); 33 | } 34 | dialog.setVisible(true); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/app/ToggleCommandPaletteCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.app; 15 | 16 | import com.smoothcsv.core.component.CommandPalette; 17 | import com.smoothcsv.framework.command.Command; 18 | 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | public class ToggleCommandPaletteCommand extends Command { 24 | 25 | private CommandPalette commandPalette; 26 | 27 | @Override 28 | public void run() { 29 | if (commandPalette == null) { 30 | commandPalette = new CommandPalette(); 31 | } 32 | if (commandPalette.isVisible()) { 33 | commandPalette.setVisible(false); 34 | } else { 35 | commandPalette.setVisible(true); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/cell_editor/FocusCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.cell_editor; 15 | 16 | import com.smoothcsv.core.command.VisibleComponentCommandBase; 17 | import com.smoothcsv.core.csvsheet.CsvGridSheetCellStringEditor; 18 | import com.smoothcsv.core.csvsheet.CsvGridSheetCellStringEditor.CsvGridEditorComponent; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | public class FocusCommand 24 | extends VisibleComponentCommandBase { 25 | 26 | public FocusCommand() { 27 | super("cell-editor"); 28 | } 29 | 30 | @Override 31 | public void run(CsvGridEditorComponent component) { 32 | component.requestFocus(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/cell_editor/RedoCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.cell_editor; 15 | 16 | import com.smoothcsv.core.command.VisibleComponentCommandBase; 17 | import com.smoothcsv.core.csvsheet.CsvGridSheetCellStringEditor; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class RedoCommand extends 23 | VisibleComponentCommandBase { 24 | 25 | /** 26 | * @param cssSelector 27 | */ 28 | public RedoCommand() { 29 | super("cell-editor"); 30 | } 31 | 32 | @Override 33 | public void run(CsvGridSheetCellStringEditor.CsvGridEditorComponent component) { 34 | new command.value_panel.RedoCommand().execute(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/cell_editor/UndoCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.cell_editor; 15 | 16 | import com.smoothcsv.core.command.VisibleComponentCommandBase; 17 | import com.smoothcsv.core.csvsheet.CsvGridSheetCellStringEditor; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class UndoCommand extends 23 | VisibleComponentCommandBase { 24 | 25 | /** 26 | * @param cssSelector 27 | */ 28 | public UndoCommand() { 29 | super("cell-editor"); 30 | } 31 | 32 | @Override 33 | public void run(CsvGridSheetCellStringEditor.CsvGridEditorComponent component) { 34 | new command.value_panel.UndoCommand().execute(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/convert/CamelCaseToSnakeCaseCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.convert; 15 | 16 | import com.smoothcsv.commons.utils.StringUtils; 17 | import com.smoothcsv.core.command.ConvertCommandBase; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class CamelCaseToSnakeCaseCommand extends ConvertCommandBase { 23 | 24 | @Override 25 | protected String convert(String s) { 26 | return StringUtils.decamelize(s); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/convert/CapitalizeCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.convert; 15 | 16 | import com.smoothcsv.core.command.ConvertCommandBase; 17 | import org.apache.commons.lang3.StringUtils; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class CapitalizeCommand extends ConvertCommandBase { 23 | 24 | @Override 25 | protected String convert(String s) { 26 | return StringUtils.capitalize(s); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/convert/DecapitalizeCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.convert; 15 | 16 | import com.smoothcsv.core.command.ConvertCommandBase; 17 | import org.apache.commons.lang3.StringUtils; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class DecapitalizeCommand extends ConvertCommandBase { 23 | 24 | @Override 25 | protected String convert(String s) { 26 | return StringUtils.uncapitalize(s); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/convert/LowerCaseCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.convert; 15 | 16 | import com.smoothcsv.core.command.ConvertCommandBase; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public class LowerCaseCommand extends ConvertCommandBase { 22 | 23 | @Override 24 | protected String convert(String val) { 25 | return val == null ? null : val.toLowerCase(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/convert/SwapCaseCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.convert; 15 | 16 | import com.smoothcsv.core.command.ConvertCommandBase; 17 | import org.apache.commons.lang3.StringUtils; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class SwapCaseCommand extends ConvertCommandBase { 23 | 24 | @Override 25 | protected String convert(String s) { 26 | return StringUtils.swapCase(s); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/convert/TitleCaseCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.convert; 15 | 16 | import com.smoothcsv.core.command.ConvertCommandBase; 17 | import org.apache.commons.lang3.text.WordUtils; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class TitleCaseCommand extends ConvertCommandBase { 23 | 24 | @Override 25 | protected String convert(String val) { 26 | return WordUtils.capitalizeFully(val); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/convert/UpperCaseCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.convert; 15 | 16 | import com.smoothcsv.core.command.ConvertCommandBase; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public class UpperCaseCommand extends ConvertCommandBase { 22 | 23 | @Override 24 | protected String convert(String val) { 25 | return val == null ? null : val.toUpperCase(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/find/HideCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.find; 15 | 16 | import com.smoothcsv.core.ApplicationStatus; 17 | import com.smoothcsv.core.find.FindAndReplacePanel; 18 | import com.smoothcsv.framework.command.Command; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | public class HideCommand extends Command { 24 | 25 | @Override 26 | public void run() { 27 | FindAndReplacePanel findAndReplacePanel = FindAndReplacePanel.getInstance(); 28 | findAndReplacePanel.close(); 29 | 30 | ApplicationStatus.getInstance().setFindAndReplacePanelVisible(false); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/find/PreviousCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.find; 15 | 16 | 17 | /** 18 | * @author kohii 19 | */ 20 | public class PreviousCommand extends NextCommand { 21 | 22 | public PreviousCommand() { 23 | reverse = true; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/find/ReplacePreviousCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.find; 15 | 16 | 17 | /** 18 | * @author kohii 19 | */ 20 | public class ReplacePreviousCommand extends ReplaceNextCommand { 21 | 22 | public ReplacePreviousCommand() { 23 | reverse = true; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/grid/CancelEditCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.grid; 15 | 16 | import com.smoothcsv.core.command.GridCommand; 17 | import com.smoothcsv.core.csvsheet.CsvGridSheetPane; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class CancelEditCommand extends GridCommand { 23 | 24 | @Override 25 | public void run(CsvGridSheetPane gridSheet) { 26 | if (gridSheet.isEditing()) { 27 | gridSheet.getTable().getCellEditor().cancelCellEditing(); 28 | gridSheet.requestFocus(); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/grid/ClearCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.grid; 15 | 16 | import com.smoothcsv.core.command.GridCommand; 17 | import com.smoothcsv.core.csvsheet.CsvGridSheetPane; 18 | import com.smoothcsv.core.csvsheet.edits.EditTransaction; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | public class ClearCommand extends GridCommand { 24 | 25 | @Override 26 | public void run(CsvGridSheetPane gridSheetPane) { 27 | try (EditTransaction tran = gridSheetPane.transaction()) { 28 | gridSheetPane.getSelectionModel().forEachSelectedCell((row, column) -> { 29 | gridSheetPane.setValueAt("", row, column); 30 | }); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/grid/CopyUsingFileFormatCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.grid; 15 | 16 | import com.smoothcsv.core.command.GridCommand; 17 | import com.smoothcsv.core.csvsheet.CsvGridSheetPane; 18 | import com.smoothcsv.swing.utils.ClipboardUtils; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | public class CopyUsingFileFormatCommand extends GridCommand { 24 | 25 | @Override 26 | public void run(CsvGridSheetPane gridSheetPane) { 27 | String text = 28 | CopyCommand.copy(gridSheetPane, gridSheetPane.getCsvSheetView().getViewInfo().getCsvMeta()); 29 | ClipboardUtils.writeText(text); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/grid/CutCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.grid; 15 | 16 | import com.smoothcsv.core.csvsheet.CsvGridSheetPane; 17 | import com.smoothcsv.core.csvsheet.edits.EditTransaction; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class CutCommand extends CopyCommand { 23 | 24 | @Override 25 | public void run(CsvGridSheetPane gridSheetPane) { 26 | super.run(gridSheetPane); 27 | try (EditTransaction tran = gridSheetPane.transaction()) { 28 | gridSheetPane.getSelectionModel().forEachSelectedCell((row, column) -> { 29 | gridSheetPane.setValueAt("", row, column); 30 | }); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/grid/CutUsingFileFormatCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.grid; 15 | 16 | import com.smoothcsv.core.csvsheet.CsvGridSheetPane; 17 | import com.smoothcsv.core.csvsheet.edits.EditTransaction; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class CutUsingFileFormatCommand extends CopyUsingFileFormatCommand { 23 | 24 | @Override 25 | public void run(CsvGridSheetPane gridSheetPane) { 26 | super.run(gridSheetPane); 27 | try (EditTransaction tran = gridSheetPane.transaction()) { 28 | gridSheetPane.getSelectionModel().forEachSelectedCell((row, column) -> { 29 | gridSheetPane.setValueAt("", row, column); 30 | }); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/grid/FocusCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.grid; 15 | 16 | import com.smoothcsv.core.command.GridCommand; 17 | import com.smoothcsv.core.csvsheet.CsvGridSheetPane; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class FocusCommand extends GridCommand { 23 | 24 | @Override 25 | public void run(CsvGridSheetPane gridSheetPane) { 26 | if (gridSheetPane.isEditing()) { 27 | gridSheetPane.stopCellEditingIfEditing(); 28 | } 29 | gridSheetPane.requestFocus(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/grid/SelectAllCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.grid; 15 | 16 | import com.smoothcsv.core.command.GridCommand; 17 | import com.smoothcsv.core.csvsheet.CsvGridSheetPane; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class SelectAllCommand extends GridCommand { 23 | 24 | @Override 25 | public void run(CsvGridSheetPane gridSheet) { 26 | gridSheet.selectAll(false); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/grid/SelectEntireColumnCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.grid; 15 | 16 | import com.smoothcsv.core.command.GridCommand; 17 | import com.smoothcsv.core.csvsheet.CsvGridSheetPane; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class SelectEntireColumnCommand extends GridCommand { 23 | 24 | @Override 25 | public void run(CsvGridSheetPane gridSheetPane) { 26 | gridSheetPane.selectEntireColumn(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/grid/SelectEntireRowCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.grid; 15 | 16 | import com.smoothcsv.core.command.GridCommand; 17 | import com.smoothcsv.core.csvsheet.CsvGridSheetPane; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class SelectEntireRowCommand extends GridCommand { 23 | 24 | @Override 25 | public void run(CsvGridSheetPane gridSheetPane) { 26 | gridSheetPane.selectEntireRow(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/grid/StopEditCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.grid; 15 | 16 | import com.smoothcsv.core.command.GridCommand; 17 | import com.smoothcsv.core.csvsheet.CsvGridSheetPane; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class StopEditCommand extends GridCommand { 23 | 24 | @Override 25 | public void run(CsvGridSheetPane gridSheet) { 26 | if (gridSheet.isEditing()) { 27 | gridSheet.getTable().stopCellEditing(); 28 | gridSheet.getTable().requestFocus(); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/grid/ToggleUseFirstRowAsHeaderCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.grid; 15 | 16 | import com.smoothcsv.core.command.GridCommand; 17 | import com.smoothcsv.core.csvsheet.CsvGridSheetModel; 18 | import com.smoothcsv.core.csvsheet.CsvGridSheetPane; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | public class ToggleUseFirstRowAsHeaderCommand extends GridCommand { 24 | 25 | @Override 26 | public void run(CsvGridSheetPane gridSheetPane) { 27 | gridSheetPane.stopCellEditingIfEditing(); 28 | CsvGridSheetModel model = gridSheetPane.getModel(); 29 | boolean oldVal = model.usesFirstRowAsHeader(); 30 | model.setUseFirstRowAsHeader(!oldVal); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/macro/ToggleConsoleCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.macro; 15 | 16 | import com.smoothcsv.core.command.VisibleComponentCommandBase; 17 | import com.smoothcsv.core.macro.component.MacroToolsPanel; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class ToggleConsoleCommand extends VisibleComponentCommandBase { 23 | 24 | /** 25 | * @param cssSelector 26 | */ 27 | public ToggleConsoleCommand() { 28 | super("macro-tools"); 29 | } 30 | 31 | @Override 32 | public void run(MacroToolsPanel component) { 33 | component.setConsoleAlwaysVisible(!component.isConsoleAlwaysVisible()); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/macrolist/RemoveCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.macrolist; 15 | 16 | import com.smoothcsv.core.command.VisibleComponentCommandBase; 17 | import com.smoothcsv.core.macro.component.MacroListPanel; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class RemoveCommand extends VisibleComponentCommandBase { 23 | 24 | public RemoveCommand() { 25 | super("macro-list"); 26 | } 27 | 28 | @Override 29 | public void run(MacroListPanel component) { 30 | component.removeSelectedMacro(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/sql/NextSqlCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.sql; 15 | 16 | import com.smoothcsv.core.command.SqlEditorCommandBase; 17 | import com.smoothcsv.core.sql.component.SqlEditor; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class NextSqlCommand extends SqlEditorCommandBase { 23 | 24 | @Override 25 | public void run(SqlEditor component) { 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/sql/PreviousSqlCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.sql; 15 | 16 | import com.smoothcsv.core.command.SqlEditorCommandBase; 17 | import com.smoothcsv.core.sql.component.SqlEditor; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class PreviousSqlCommand extends SqlEditorCommandBase { 23 | 24 | @Override 25 | public void run(SqlEditor component) { 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/sql/ShowSqlHistoryCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.sql; 15 | 16 | import com.smoothcsv.core.command.SqlEditorCommandBase; 17 | import com.smoothcsv.core.sql.component.SqlEditor; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class ShowSqlHistoryCommand extends SqlEditorCommandBase { 23 | 24 | @Override 25 | public void run(SqlEditor component) { 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/value_panel/FocusCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.value_panel; 15 | 16 | import com.smoothcsv.core.command.ValuePanelCommandBase; 17 | import com.smoothcsv.core.csvsheet.CsvGridSheetCellValuePanel; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class FocusCommand extends ValuePanelCommandBase { 23 | 24 | @Override 25 | protected void run(CsvGridSheetCellValuePanel valuePanel) { 26 | valuePanel.getTextArea().requestFocus(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/value_panel/RedoCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.value_panel; 15 | 16 | import javax.swing.undo.UndoManager; 17 | 18 | import com.smoothcsv.core.command.ValuePanelCommandBase; 19 | import com.smoothcsv.core.csvsheet.CsvGridSheetCellValuePanel; 20 | 21 | /** 22 | * @author kohii 23 | */ 24 | public class RedoCommand extends ValuePanelCommandBase { 25 | 26 | @Override 27 | protected void run(CsvGridSheetCellValuePanel valuePanel) { 28 | UndoManager um = valuePanel.getUndoManager(); 29 | if (um.canRedo()) { 30 | um.redo(); 31 | } else { 32 | abort(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/value_panel/ToggleFloatingCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.value_panel; 15 | 16 | import com.smoothcsv.core.command.ValuePanelCommandBase; 17 | import com.smoothcsv.core.csvsheet.CsvGridSheetCellValuePanel; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class ToggleFloatingCommand extends ValuePanelCommandBase { 23 | 24 | @Override 25 | protected void run(CsvGridSheetCellValuePanel valuePanel) { 26 | valuePanel.toggleFloating(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/java/command/value_panel/UndoCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.value_panel; 15 | 16 | import javax.swing.undo.UndoManager; 17 | 18 | import com.smoothcsv.core.command.ValuePanelCommandBase; 19 | import com.smoothcsv.core.csvsheet.CsvGridSheetCellValuePanel; 20 | 21 | /** 22 | * @author kohii 23 | */ 24 | public class UndoCommand extends ValuePanelCommandBase { 25 | 26 | @Override 27 | protected void run(CsvGridSheetCellValuePanel valuePanel) { 28 | UndoManager um = valuePanel.getUndoManager(); 29 | if (um.canUndo()) { 30 | um.undo(); 31 | } else { 32 | abort(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/META-INF/services/com.smoothcsv.framework.modular.ModuleEntryPoint: -------------------------------------------------------------------------------- 1 | com.smoothcsv.core.CoreEntryPoint -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | version.name=@project.version@ 2 | 3 | author.name=kohii 4 | copyright.since=2018 5 | 6 | site.url=https://smoothcsv.com/ 7 | 8 | jdbc.driverClassName=org.h2.Driver 9 | jdbc.url=jdbc:h2:file:{0};DATABASE_TO_UPPER=FALSE 10 | jdbc.username=sa 11 | jdbc.password= 12 | jdbc.defaultDbName=./db/default -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/com/smoothcsv/core/filter/Criteria.properties: -------------------------------------------------------------------------------- 1 | EQUALS=equals 2 | DOES_NOT_EQUAL=does not equal 3 | MATCHES_THE_REGEX_OF=matches the following regular expression 4 | STARTS_WITH=starts with 5 | DOES_NOT_START_WITH=does not start with 6 | ENDS_WITH=ends with 7 | DOES_NOT_END_WITH=does not end with 8 | CONTAINS=contains 9 | DOES_NOT_CONTAIN=not contain 10 | IS_A_NUMBER_GREATER_THAN=is a number greater than 11 | IS_A_NUMBER_LESS_THAN=is a number less than 12 | IS_A_NUMBER_EQUAL_TO_OR_GREATER_THAN=is a number equal to greater than 13 | IS_A_NUMBER_EQUAL_TO_OR_LESS_THAN=is a number equal to less than 14 | IS_IN=matches to one of the following 15 | IS_NOT_IN=does not match any of the following 16 | IS_EMPTY=is empty. 17 | IS_NOT_EMPTY=is not empty. 18 | IS_A_NUMERIC=is a numeric. 19 | IS_NOT_A_NUMERIC=is not a numeric. 20 | IS_A_STRING_GREATER_THAN=is a string greater than 21 | IS_A_STRING_LESS_THAN=is a string less than 22 | EXISTS=exists. 23 | DOES_NOT_EXISTS=does not exists. 24 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/com/smoothcsv/core/sort/BlanksOption.properties: -------------------------------------------------------------------------------- 1 | BLANKS_FIRST=Blanks First 2 | BLANKS_LAST=Blanks Last 3 | DEFAULT=Default -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/com/smoothcsv/core/sort/BlanksOption_ja.properties: -------------------------------------------------------------------------------- 1 | BLANKS_FIRST=\u7a7a\u767d\u3092\u5148\u982d\u306b 2 | BLANKS_LAST=\u7a7a\u767d\u3092\u672b\u5c3e\u306b 3 | DEFAULT=\u30c7\u30d5\u30a9\u30eb\u30c8 -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/com/smoothcsv/core/sort/Order.properties: -------------------------------------------------------------------------------- 1 | ASCENDING=Ascending 2 | DESCENDING=Descending -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/com/smoothcsv/core/sort/Order_ja.properties: -------------------------------------------------------------------------------- 1 | ASCENDING=\u6607\u9806 2 | DESCENDING=\u964d\u9806 -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/com/smoothcsv/core/sort/ValueType.properties: -------------------------------------------------------------------------------- 1 | STRING=Treat As String 2 | NUMBER=Treat As Number -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/com/smoothcsv/core/sort/ValueType_ja.properties: -------------------------------------------------------------------------------- 1 | STRING=\u6587\u5b57\u5217\u3068\u3057\u3066\u6271\u3046 2 | NUMBER=\u6570\u5024\u3068\u3057\u3066\u6271\u3046 -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon16x16.png -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon16x16@2x.png -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_128x128.png -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_128x128@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_128x128@2.png -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_256x256.png -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_256x256@2x.png -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_32x32.png -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_32x32@2x.png -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_512x512.png -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/app/icon_512x512@2x.png -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/progress.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-app-modules/smoothcsv-core/src/main/resources/img/progress.gif -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/macro/init.js: -------------------------------------------------------------------------------- 1 | global = this; 2 | 3 | App = Packages.com.smoothcsv.core.macro.api.App; 4 | CellVisitor = Packages.com.smoothcsv.core.macro.api.CellVisitor; 5 | Clipboard = Packages.com.smoothcsv.core.macro.api.Clipboard; 6 | Command = Packages.com.smoothcsv.core.macro.api.Command; 7 | CsvProperties = Packages.com.smoothcsv.core.macro.api.CsvProperties; 8 | Macro = Packages.com.smoothcsv.core.macro.api.Macro; 9 | Window = Packages.com.smoothcsv.core.macro.api.Window; 10 | console = new Packages.com.smoothcsv.core.macro.api.Console(); -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/settings/core.prefs: -------------------------------------------------------------------------------- 1 | # --General-- 2 | language= 3 | statusbarVisible=true 4 | toolbarVisible=true 5 | valuePanelVisible=true 6 | autoUpdateCheck=true 7 | 8 | # --File-- 9 | alertOnOpeningHugeFile=true 10 | alertThreshold=50 11 | howToDetectProperties=auto 12 | 13 | # --Editor-- 14 | defaultRowSize=5 15 | defaultColumnSize=5 16 | sizeOfUndoing=35 17 | valuePanelHeight=2 18 | showEOL=false 19 | showEOF=false 20 | 21 | # --TextArea-- 22 | textArea.showEOL=true 23 | textArea.showTab=true 24 | textArea.showSpace=false 25 | textArea.wrap=true 26 | 27 | # --Autofit-- 28 | autoFitColumnWidthAfterOpeningFile=true 29 | autoFitColumnWidthAfterEditingCell=true 30 | autoFitColumnWidthWithLimitedRowSize=true 31 | rowSizeToScanWhenAutoFitting=1000 32 | limitWidthWhenAutoFitting=true 33 | maxColumnWidthPerWindowWhenAutoFitting=70 34 | 35 | # --Copy&Paste-- 36 | quoteRuleForCopying=QUOTES_IF_NECESSARY 37 | pasteRepeatedly=true 38 | 39 | # --Others-- 40 | autoBackupOnOverwrite=true 41 | noBackupIfSame=true 42 | deleteBackupOnExit=false 43 | deleteOldBackups=true 44 | deleteBackupNHoursAgo=24 -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/settings/csvprop.prefs: -------------------------------------------------------------------------------- 1 | csvprop.encodingOptions=ASCII,UTF-8,UTF-8 (with BOM),UTF-16BE,UTF-16BE (with BOM),ISO-8859-1 2 | csvprop.delimiterCharOptions=,\t 3 | csvprop.quoteCharOptions="' -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/settings/csvprop_ja.prefs: -------------------------------------------------------------------------------- 1 | csvprop.encodingOptions=Shift_JIS (MS932),EUC-JP,UTF-8,UTF-8 (with BOM),UTF-16BE,UTF-16BE (with BOM) 2 | csvprop.delimiterCharOptions=,\t 3 | csvprop.quoteCharOptions="' -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/settings/ui.prefs: -------------------------------------------------------------------------------- 1 | # default 2 | default.fontSize= 3 | default.fontName= 4 | default.foreground= 5 | default.background= 6 | # statusbar 7 | statusbar.fontSize= 8 | statusbar.fontName= 9 | # grid 10 | grid.fontSize= 11 | grid.fontName= 12 | grid.foreground= 13 | grid.background= 14 | grid.lineColor= 15 | grid.frozenLineColor= 16 | grid.selection.background= 17 | grid.selection.borderColor= 18 | grid.selection.alpha= 19 | grid.findHighlight= 20 | # grid-header 21 | gridHeader.foreground= 22 | gridHeader.background= 23 | gridHeader.selected.foreground= 24 | gridHeader.selected.background= 25 | gridHeader.focused.foreground= 26 | gridHeader.focused.background= 27 | #gridHeader.lineColor= 28 | # celleditor 29 | celleditor.fontSize= 30 | celleditor.fontName= 31 | celleditor.foreground= 32 | celleditor.background= 33 | celleditor.caretColor= 34 | # inline-celleditor 35 | inline-celleditor.fontSize= 36 | inline-celleditor.fontName= 37 | inline-celleditor.foreground= 38 | inline-celleditor.background= 39 | inline-celleditor.caretColor= -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/settings/update.prefs: -------------------------------------------------------------------------------- 1 | lastChoice= 2 | lastVersion= 3 | lastChecked= -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/smoothcsv-core/smoothcsv-contextmenu_ja.tsv: -------------------------------------------------------------------------------- 1 | grid 2 | コピー grid:Copy 3 | 切り取り grid:Cut 4 | 貼り付け grid:Paste 5 | - 6 | ファイルの書式でコピー grid:CopyUsingFileFormat 7 | ファイルの書式で切り取り grid:CutUsingFileFormat 8 | ファイルの書式で貼り付け grid:PasteUsingFileFormat 9 | - 10 | マークダウンのテーブル形式でコピー grid:CopyAsMarkdownTable 11 | HTMLのテーブル形式でコピー grid:CopyAsHtmlTable 12 | JSON形式でコピー grid:CopyAsJson 13 | JavaScriptのオブジェクト配列としてコピー grid:CopyAsJavaScriptData 14 | SQLのINSERT文としてコピー grid:CopyAsSqlInsert 15 | - 16 | クリア grid:Clear 17 | セルを除去 grid:DeleteCell 18 | - 19 | すべて選択 grid:SelectAll 20 | 21 | grid-rowheader 22 | コピー grid:Copy 23 | 切り取り grid:Cut 24 | 貼り付け grid:Paste 25 | - 26 | 上に行を挿入 grid:InsertRowsAbove 27 | 下に行を挿入 grid:InsertRowsBelow 28 | 行を削除 grid:DeleteRows 29 | 30 | grid-columnheader 31 | コピー grid:Copy 32 | 切り取り grid:Cut 33 | 貼り付け grid:Paste 34 | - 35 | 左に列を挿入 grid:InsertColumnsLeft 36 | 右に列を挿入 grid:InsertColumnsRight 37 | 列を削除 grid:DeleteColumns 38 | - 39 | 1行目を列名として扱う grid:ToggleUseFirstRowAsHeader 40 | 並べ替え... grid:Sort 41 | 42 | grid-cornerheader 43 | コピー grid:Copy 44 | 切り取り grid:Cut 45 | 貼り付け grid:Paste 46 | 47 | tab 48 | 閉じる app:Close 49 | 他のタブを閉じる app:CloseOthers 50 | すべて閉じる app:CloseAll -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/smoothcsv-core/smoothcsv-toolbar.tsv: -------------------------------------------------------------------------------- 1 | app:NewFile fa:#f016 New 2 | app:OpenFile fa:#f115 Open... 3 | app:Save fa:#f0c7 Save 4 | csvsheet:ShowProperties fa:#f02b Properties... 5 | - 6 | grid:Copy fa:#f0c5 Copy 7 | grid:Cut fa:#f0c4 Cut 8 | grid:Paste fa:#f0ea Paste 9 | - 10 | grid:Undo fa:#f0e2 Undo 11 | grid:Redo fa:#f01e Redo 12 | - 13 | find:Show fa:#f002 Find And Replace 14 | grid:Sort fa:#f15d Sort... 15 | grid:AutofitColumnWidth fa:#f07e Auto-Fit Column Width 16 | - 17 | app:ShowSqlTools fa:#f1c0 SQL Tools... 18 | - 19 | app:ShowSettings fa:#f013 Preferences... -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-core/src/main/resources/smoothcsv-core/smoothcsv-toolbar_ja.tsv: -------------------------------------------------------------------------------- 1 | app:NewFile fa:#f016 新規作成 2 | app:OpenFile fa:#f115 開く... 3 | app:Save fa:#f0c7 保存 4 | csvsheet:ShowProperties fa:#f02b プロパティ... 5 | - 6 | grid:Copy fa:#f0c5 コピー 7 | grid:Cut fa:#f0c4 切り取り 8 | grid:Paste fa:#f0ea 貼り付け 9 | - 10 | grid:Undo fa:#f0e2 元に戻す 11 | grid:Redo fa:#f01e やり直す 12 | - 13 | find:Show fa:#f002 検索と置換 14 | grid:Sort fa:#f15d 並べ替え... 15 | grid:AutofitColumnWidth fa:#f07e 列幅を自動調整 16 | - 17 | app:ShowSqlTools fa:#f1c0 SQLツール... 18 | - 19 | app:ShowSettings fa:#f013 設定... -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-debug/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | 3 | dependencies { 4 | compile project(':smoothcsv-framework') 5 | compile project(':smoothcsv-app-modules:smoothcsv-core') 6 | } 7 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-debug/src/main/java/command/debug/EnableWatchThreadCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.debug; 15 | 16 | import com.smoothcsv.framework.command.Command; 17 | import org.slf4j.Logger; 18 | import org.slf4j.LoggerFactory; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | public class EnableWatchThreadCommand extends Command { 24 | 25 | static Logger LOG = LoggerFactory.getLogger(EnableWatchThreadCommand.class); 26 | 27 | Thread thread; 28 | 29 | @Override 30 | public void run() { 31 | if (thread == null) { 32 | start(); 33 | } else { 34 | thread.interrupt(); 35 | } 36 | } 37 | 38 | void start() { 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-debug/src/main/java/command/debug/PrintCommandsCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.debug; 15 | 16 | import com.smoothcsv.framework.command.Command; 17 | import com.smoothcsv.framework.command.CommandRegistry; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class PrintCommandsCommand extends Command { 23 | 24 | @Override 25 | public void run() { 26 | System.out.println(CommandRegistry.instance()); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-debug/src/main/java/command/debug/PrintFocusOwnerCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.debug; 15 | 16 | import com.smoothcsv.framework.command.Command; 17 | import com.smoothcsv.swing.utils.SwingUtils; 18 | import org.slf4j.Logger; 19 | import org.slf4j.LoggerFactory; 20 | 21 | /** 22 | * @author kohii 23 | */ 24 | public class PrintFocusOwnerCommand extends Command { 25 | 26 | static Logger LOG = LoggerFactory.getLogger(PrintFocusOwnerCommand.class); 27 | 28 | @Override 29 | public void run() { 30 | LOG.debug("Focus owner: ", SwingUtils.getFocusOwner()); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-debug/src/main/java/command/debug/PrintKeymapCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.debug; 15 | 16 | import com.smoothcsv.framework.command.Command; 17 | import com.smoothcsv.framework.command.CommandKeymap; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class PrintKeymapCommand extends Command { 23 | 24 | @Override 25 | public void run() { 26 | System.out.println(CommandKeymap.getDefault()); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-debug/src/main/resources/META-INF/services/com.smoothcsv.framework.modular.ModuleEntryPoint: -------------------------------------------------------------------------------- 1 | com.smoothcsv.debug.DebugEntryPoint -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-debug/src/main/resources/smoothcsv-debug/smoothcsv-command.tsv: -------------------------------------------------------------------------------- 1 | debug:EnableWatchThread 2 | debug:PrintFocusOwner 3 | debug:PrintKeymap 4 | debug:PrintComponentTree 5 | debug:PrintMenuComponentTree 6 | debug:PrintGridData 7 | debug:PrintConditions -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-debug/src/main/resources/smoothcsv-debug/smoothcsv-keymap.tsv: -------------------------------------------------------------------------------- 1 | body 2 | shortcut+shift+f12 debug:EnableWatchThread 3 | shortcut+f12 debug:PrintFocusOwner -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-ja/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | 3 | dependencies { 4 | compile project(':smoothcsv-framework') 5 | compile project(':smoothcsv-app-modules:smoothcsv-core') 6 | compile 'com.ibm.icu:icu4j:55.1' 7 | } 8 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-ja/src/main/java/com/smoothcsv/ja/JaEntryPoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.ja; 15 | 16 | import com.smoothcsv.framework.modular.ModuleEntryPointBase; 17 | import com.smoothcsv.framework.modular.ModuleManifest; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class JaEntryPoint extends ModuleEntryPointBase { 23 | @Override 24 | public ModuleManifest getManifest() { 25 | return ModuleManifest.builder() 26 | .name("smoothcsv-ja") 27 | .author("kohii") 28 | .dependencies(new String[]{"smoothcsv-core"}) 29 | .supportedLanguages(new ModuleManifest.Language[]{new ModuleManifest.Language("ja", "日本語")}) 30 | .build(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-ja/src/main/java/command/convert/FullWidthToHalfWidthCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.convert; 15 | 16 | import com.ibm.icu.text.Transliterator; 17 | import com.smoothcsv.core.command.ConvertCommandBase; 18 | import org.apache.commons.lang3.StringUtils; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | public class FullWidthToHalfWidthCommand extends ConvertCommandBase { 24 | 25 | private Transliterator transliterator = Transliterator.getInstance("Fullwidth-Halfwidth"); 26 | 27 | @Override 28 | protected String convert(String val) { 29 | if (StringUtils.isEmpty(val)) { 30 | return val; 31 | } 32 | return transliterator.transliterate(val); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-ja/src/main/java/command/convert/HalfWidthToFullWidthCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.convert; 15 | 16 | import com.ibm.icu.text.Transliterator; 17 | import com.smoothcsv.core.command.ConvertCommandBase; 18 | import org.apache.commons.lang3.StringUtils; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | public class HalfWidthToFullWidthCommand extends ConvertCommandBase { 24 | 25 | private Transliterator transliterator = Transliterator.getInstance("Halfwidth-Fullwidth"); 26 | 27 | @Override 28 | protected String convert(String val) { 29 | if (StringUtils.isEmpty(val)) { 30 | return val; 31 | } 32 | return transliterator.transliterate(val); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-ja/src/main/java/command/convert/HiraganaToKatakanaCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.convert; 15 | 16 | import com.ibm.icu.text.Transliterator; 17 | import com.smoothcsv.core.command.ConvertCommandBase; 18 | import org.apache.commons.lang3.StringUtils; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | public class HiraganaToKatakanaCommand extends ConvertCommandBase { 24 | 25 | private Transliterator transliterator = Transliterator.getInstance("Hiragana-Katakana"); 26 | 27 | @Override 28 | protected String convert(String val) { 29 | if (StringUtils.isEmpty(val)) { 30 | return val; 31 | } 32 | return transliterator.transliterate(val); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-ja/src/main/java/command/convert/KatakanaToHiraganaCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.convert; 15 | 16 | import com.ibm.icu.text.Transliterator; 17 | import com.smoothcsv.core.command.ConvertCommandBase; 18 | import org.apache.commons.lang3.StringUtils; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | public class KatakanaToHiraganaCommand extends ConvertCommandBase { 24 | 25 | private Transliterator transliterator = Transliterator.getInstance("Katakana-Hiragana"); 26 | 27 | @Override 28 | protected String convert(String val) { 29 | if (StringUtils.isEmpty(val)) { 30 | return val; 31 | } 32 | return transliterator.transliterate(val); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-ja/src/main/java/command/convert/LatinToKatakanaCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package command.convert; 15 | 16 | import com.ibm.icu.text.Transliterator; 17 | import com.smoothcsv.core.command.ConvertCommandBase; 18 | import org.apache.commons.lang3.StringUtils; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | public class LatinToKatakanaCommand extends ConvertCommandBase { 24 | 25 | private Transliterator transliterator = Transliterator.getInstance("Latin-Katakana"); 26 | 27 | @Override 28 | protected String convert(String val) { 29 | if (StringUtils.isEmpty(val)) { 30 | return val; 31 | } 32 | return transliterator.transliterate(val); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-ja/src/main/resources/META-INF/services/com.smoothcsv.framework.modular.ModuleEntryPoint: -------------------------------------------------------------------------------- 1 | com.smoothcsv.ja.JaEntryPoint -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-ja/src/main/resources/smoothcsv-ja/smoothcsv-command.tsv: -------------------------------------------------------------------------------- 1 | convert:FullWidthToHalfWidth not_editing_cell 2 | convert:HalfWidthToFullWidth not_editing_cell 3 | convert:HiraganaToKatakana not_editing_cell 4 | convert:KatakanaToHiragana not_editing_cell 5 | convert:KanaToLatin not_editing_cell 6 | convert:LatinToKatakana not_editing_cell -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-ja/src/main/resources/smoothcsv-ja/smoothcsv-menubar_ja.tsv: -------------------------------------------------------------------------------- 1 | 編集 2 | 日本語変換 3 | 半角 → 全角 convert:HalfWidthToFullWidth 4 | 全角 → 半角 convert:FullWidthToHalfWidth 5 | ひらがな → カタカナ convert:HiraganaToKatakana 6 | カタカナ → ひらがな convert:KatakanaToHiragana 7 | ひらがな・カタカナ → ローマ字 convert:KanaToLatin 8 | ローマ字 → カタカナ convert:LatinToKatakana -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-mac/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | 3 | dependencies { 4 | compile project(':smoothcsv-framework') 5 | compile project(':smoothcsv-app-modules:smoothcsv-core') 6 | } 7 | 8 | compileJava { 9 | options.compilerArgs << "-XDignore.symbol.file=true" 10 | options.fork = true 11 | options.forkOptions.executable = 'javac' 12 | } 13 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-mac/src/main/resources/META-INF/services/com.smoothcsv.framework.modular.ModuleEntryPoint: -------------------------------------------------------------------------------- 1 | com.smoothcsv.mac.MacEntryPoint -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-windows/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | 3 | dependencies { 4 | compile project(':smoothcsv-framework') 5 | } -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-windows/src/main/java/com/smoothcsv/windows/WindowsEntryPoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.windows; 15 | 16 | import com.smoothcsv.framework.modular.ModuleEntryPointBase; 17 | import com.smoothcsv.framework.modular.ModuleManifest; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class WindowsEntryPoint extends ModuleEntryPointBase { 23 | 24 | @Override 25 | public ModuleManifest getManifest() { 26 | return ModuleManifest.builder() 27 | .name("smoothcsv-windows") 28 | .author("kohii") 29 | .dependencies(new String[]{"smoothcsv-core"}) 30 | .build(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-windows/src/main/resources/META-INF/services/com.smoothcsv.framework.modular.ModuleEntryPoint: -------------------------------------------------------------------------------- 1 | com.smoothcsv.windows.WindowsEntryPoint -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-windows/src/main/resources/smoothcsv-windows/smoothcsv-menubar.tsv: -------------------------------------------------------------------------------- 1 | Tools 2 | Settings app:ShowSettings -------------------------------------------------------------------------------- /smoothcsv-app-modules/smoothcsv-windows/src/main/resources/smoothcsv-windows/smoothcsv-menubar_ja.tsv: -------------------------------------------------------------------------------- 1 | ツール 2 | 設定 app:ShowSettings -------------------------------------------------------------------------------- /smoothcsv-commons/README.md: -------------------------------------------------------------------------------- 1 | smoothcsv-commons 2 | ================= 3 | 4 | SmoothCSV common libraries for Java. 5 | -------------------------------------------------------------------------------- /smoothcsv-commons/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | 3 | dependencies { 4 | compile 'com.github.albfernandez:juniversalchardet:2.3.2' 5 | compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.13' 6 | compile 'com.smoothcsv.csv:smoothcsv-rw:1.1' 7 | } 8 | -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/java/com/smoothcsv/commons/constants/CommonConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.commons.constants; 15 | 16 | 17 | /** 18 | * @author kohii 19 | */ 20 | public interface CommonConstants { 21 | 22 | char NULL_CHARACTER = '\0'; 23 | 24 | String FILE_SEPARATOR = System.getProperty("file.separator"); 25 | 26 | Object UNDEFINED = new Object() { 27 | @Override 28 | public String toString() { 29 | return ""; 30 | } 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/java/com/smoothcsv/commons/constants/Direction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.commons.constants; 15 | 16 | import com.smoothcsv.commons.utils.EnumStringSupport; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public enum Direction { 22 | 23 | UP, RIGHT, DOWN, LEFT; 24 | 25 | @Override 26 | public String toString() { 27 | return EnumStringSupport.getString(this); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/java/com/smoothcsv/commons/constants/OperatorSymbol.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.commons.constants; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public enum OperatorSymbol { 20 | 21 | AND, OR 22 | } 23 | -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/java/com/smoothcsv/commons/constants/Orientation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.commons.constants; 15 | 16 | import com.smoothcsv.commons.utils.EnumStringSupport; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public enum Orientation { 22 | 23 | HORIZONTAL, VERTICAL; 24 | 25 | @Override 26 | public String toString() { 27 | return EnumStringSupport.getString(this); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/java/com/smoothcsv/commons/exception/CancellationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.commons.exception; 15 | 16 | public class CancellationException extends RuntimeException { 17 | 18 | private static final long serialVersionUID = -7351186447455006601L; 19 | 20 | public CancellationException() {} 21 | 22 | } 23 | -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/java/com/smoothcsv/commons/exception/IORuntimeException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.commons.exception; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public class IORuntimeException extends RuntimeException { 20 | 21 | private static final long serialVersionUID = 7357300549143045437L; 22 | 23 | public IORuntimeException(Exception cause) { 24 | super(cause); 25 | } 26 | 27 | public IORuntimeException(String message, Exception cause) { 28 | super(message, cause); 29 | } 30 | 31 | public IORuntimeException(String message) { 32 | super(message); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/java/com/smoothcsv/commons/exception/UnexpectedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.commons.exception; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public class UnexpectedException extends RuntimeException { 20 | 21 | public UnexpectedException() {} 22 | 23 | public UnexpectedException(String message) { 24 | super(message); 25 | } 26 | 27 | public UnexpectedException(String message, Throwable cause) { 28 | super(message, cause); 29 | } 30 | 31 | public UnexpectedException(Throwable cause) { 32 | super(cause); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/java/com/smoothcsv/commons/functions/FileHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.commons.functions; 15 | 16 | import java.io.File; 17 | import java.io.IOException; 18 | 19 | @FunctionalInterface 20 | public interface FileHandler { 21 | 22 | void handle(File file) throws IOException; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/java/com/smoothcsv/commons/functions/IntRangeConsumer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.commons.functions; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | @FunctionalInterface 20 | public interface IntRangeConsumer { 21 | 22 | /** 23 | * Performs this operation on the given arguments. 24 | * 25 | * @param from the first input argument 26 | * @param to the second input argument 27 | */ 28 | void accept(int from, int to); 29 | } 30 | -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/java/com/smoothcsv/commons/utils/CollectionUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.commons.utils; 15 | 16 | import java.util.ArrayList; 17 | import java.util.Arrays; 18 | import java.util.Collection; 19 | import java.util.List; 20 | 21 | /** 22 | * @author kohii 23 | */ 24 | public class CollectionUtils { 25 | 26 | public static void add(Collection c, T t, int size) { 27 | c.addAll(Arrays.asList(ArrayUtils.createAndFill(size, t))); 28 | } 29 | 30 | public static List unique(List list) { 31 | List ret = new ArrayList<>(); 32 | for (T t : list) { 33 | if (!ret.contains(t)) { 34 | ret.add(t); 35 | } 36 | } 37 | return ret; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/java/com/smoothcsv/commons/utils/ObjectUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.commons.utils; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public class ObjectUtils { 20 | 21 | public static final boolean isEmpty(Object o) { 22 | return o == null || (o instanceof CharSequence && ((CharSequence) o).length() == 0); 23 | } 24 | 25 | public static String toString(Object object) { 26 | return object == null ? null : object.toString(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/java/com/smoothcsv/commons/utils/ReflectionUtils.java: -------------------------------------------------------------------------------- 1 | package com.smoothcsv.commons.utils; 2 | 3 | import java.lang.reflect.Field; 4 | 5 | /** 6 | * @author kohii 7 | */ 8 | public class ReflectionUtils { 9 | 10 | public static Object get(Object obj, String propName) { 11 | Class clazz = obj.getClass(); 12 | try { 13 | Field field = clazz.getDeclaredField(propName); 14 | field.setAccessible(true); 15 | return field.get(obj); 16 | } catch (Exception e) { 17 | throw new RuntimeException(e); 18 | } 19 | } 20 | 21 | @SuppressWarnings("unchecked") 22 | public static T get(Object obj, String propName, Class clazz) { 23 | return (T) get(obj, propName); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/java/com/smoothcsv/commons/utils/RegexUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.commons.utils; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public class RegexUtils { 20 | 21 | private static final char[] REGEX_ESCAPE_CHARS = new char[]{'\\', '*', '+', '.', '?', '{', '}', 22 | '(', ')', '[', ']', '^', '$', '-', '|'}; 23 | 24 | public static String escapeRegex(String text) { 25 | StringBuilder sb = new StringBuilder(); 26 | for (int i = 0; i < text.length(); i++) { 27 | char c = text.charAt(i); 28 | if (ArrayUtils.contains(REGEX_ESCAPE_CHARS, c)) { 29 | sb.append('\\'); 30 | } 31 | sb.append(c); 32 | } 33 | return sb.toString(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/java/com/smoothcsv/commons/utils/ThrowableUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.commons.utils; 15 | 16 | import java.io.PrintWriter; 17 | import java.io.StringWriter; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class ThrowableUtils { 23 | 24 | public static String getStackTrace(Throwable e) { 25 | StringWriter sw = new StringWriter(); 26 | PrintWriter pw = new PrintWriter(sw); 27 | e.printStackTrace(pw); 28 | return sw.toString(); 29 | } 30 | 31 | public static final Throwable getInitialCause(Throwable t) { 32 | for (; ; ) { 33 | if (t.getCause() == null) { 34 | return t; 35 | } 36 | t = t.getCause(); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/resources/com/smoothcsv/commons/constants/Direction.properties: -------------------------------------------------------------------------------- 1 | UP=\u4e0a 2 | RIGHT=\u53f3 3 | DOWN=\u4e0b 4 | LEFT=\u5de6 -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/resources/com/smoothcsv/commons/constants/Direction_ja.properties: -------------------------------------------------------------------------------- 1 | UP=Up 2 | RIGHT=Right 3 | DOWN=Down 4 | LEFT=Left -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/resources/com/smoothcsv/commons/constants/Orientation.properties: -------------------------------------------------------------------------------- 1 | HORIZONTAL=Horizontal 2 | VERTICAL=Vertical -------------------------------------------------------------------------------- /smoothcsv-commons/src/main/resources/com/smoothcsv/commons/constants/Orientation_ja.properties: -------------------------------------------------------------------------------- 1 | HORIZONTAL=\u6c34\u5e73\u65b9\u5411 2 | VERTICAL=\u5782\u76f4\u65b9\u5411 -------------------------------------------------------------------------------- /smoothcsv-debuglauncher-mac/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'application' 2 | 3 | dependencies { 4 | compile project(':smoothcsv-framework') 5 | compile project(':smoothcsv-app-modules:smoothcsv-core') 6 | compile project(':smoothcsv-app-modules:smoothcsv-debug') 7 | compile project(':smoothcsv-app-modules:smoothcsv-mac') 8 | compile project(':smoothcsv-app-modules:smoothcsv-ja') 9 | } 10 | 11 | application { 12 | mainClassName = 'com.smoothcsv.SmoothCSV' 13 | } 14 | -------------------------------------------------------------------------------- /smoothcsv-debuglauncher-mac/src/main/java/com/smoothcsv/SmoothCSV.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv; 15 | 16 | import com.smoothcsv.core.SmoothCsvApp; 17 | import com.smoothcsv.framework.Env; 18 | import com.smoothcsv.framework.SCApplication; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | public class SmoothCSV { 24 | public static void main(String[] args) { 25 | SCApplication application = new SmoothCsvApp(Env.OS_MAC, true); 26 | application.launch(args); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-debuglauncher-mac/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /smoothcsv-framework/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | 3 | dependencies { 4 | compile project(':smoothcsv-commons') 5 | compile project(':smoothcsv-swing') 6 | compile 'javax.xml.bind:jaxb-api:2.3.0' 7 | } 8 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/command/CommandActionListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.command; 15 | 16 | import java.awt.event.ActionEvent; 17 | import java.awt.event.ActionListener; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class CommandActionListener implements ActionListener { 23 | 24 | private final String commandId; 25 | 26 | public CommandActionListener(String commandId) { 27 | this.commandId = commandId; 28 | } 29 | 30 | @Override 31 | public void actionPerformed(ActionEvent e) { 32 | CommandRegistry.instance().runCommand(commandId); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/component/StatusItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.component; 15 | 16 | import javax.swing.JPanel; 17 | 18 | public class StatusItem extends JPanel { 19 | 20 | private static final long serialVersionUID = 5712231643201307378L; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/component/support/CommandMapFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.component.support; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public interface CommandMapFactory { 20 | 21 | CommandInputMap createInputMap(SmoothComponent component); 22 | 23 | CommandActionMap createActionMap(SmoothComponent component); 24 | } 25 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/component/support/DefaultCommandMapFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.component.support; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public class DefaultCommandMapFactory implements CommandMapFactory { 20 | 21 | @Override 22 | public CommandInputMap createInputMap(SmoothComponent component) { 23 | return new CommandInputMap(component); 24 | } 25 | 26 | @Override 27 | public CommandActionMap createActionMap(SmoothComponent component) { 28 | return new CommandActionMap(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/condition/ManualCondition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.condition; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public class ManualCondition extends Condition { 20 | 21 | private boolean value; 22 | 23 | public ManualCondition(boolean defaultValue) { 24 | value = defaultValue; 25 | 26 | } 27 | 28 | @Override 29 | protected void activate() { 30 | // do nothing 31 | } 32 | 33 | @Override 34 | protected boolean computeValue() { 35 | return value; 36 | } 37 | 38 | /** 39 | * @param value the value to set 40 | */ 41 | public void setValueManually(boolean value) { 42 | this.value = value; 43 | revalidate(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/error/ErrorHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.error; 15 | 16 | public interface ErrorHandler { 17 | 18 | void handle(Throwable t); 19 | } 20 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/event/ErrorEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.event; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public class ErrorEvent implements SCEvent { 20 | 21 | private final Throwable error; 22 | 23 | public ErrorEvent(Throwable error) { 24 | this.error = error; 25 | } 26 | 27 | public Throwable getError() { 28 | return error; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/event/EventListenerSupport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.event; 15 | 16 | import java.util.function.Supplier; 17 | 18 | public interface EventListenerSupport { 19 | 20 | void on(Class eventClass, SCListener listener); 21 | 22 | > T off(T listener); 23 | 24 | void off(Class eventClass); 25 | 26 | void invokeListeners(SCEvent event); 27 | 28 | void invokeListeners(Class eventClass, Supplier eventFactory); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/event/NamedEventListenerSupport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.event; 15 | 16 | import java.util.function.Consumer; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public interface NamedEventListenerSupport { 22 | 23 | void on(String eventName, Consumer listener); 24 | 25 | Consumer off(Consumer listener); 26 | 27 | Consumer off(String eventName); 28 | 29 | void invokeListeners(String eventName); 30 | } 31 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/event/SCEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.event; 15 | 16 | public interface SCEvent { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/event/SCListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.event; 15 | 16 | public interface SCListener { 17 | 18 | void call(E event); 19 | } 20 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/exception/AbortionException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.exception; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public class AbortionException extends RuntimeException { 20 | private static final long serialVersionUID = -831862901566868605L; 21 | } 22 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/exception/CommandNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.exception; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public class CommandNotFoundException extends RuntimeException { 20 | 21 | private static final long serialVersionUID = 8198263536273925307L; 22 | 23 | private final String command; 24 | 25 | /** 26 | * @param command 27 | */ 28 | public CommandNotFoundException(String command) { 29 | super("Command not found. ID: " + command); 30 | this.command = command; 31 | } 32 | 33 | /** 34 | * @return the command 35 | */ 36 | public String getCommand() { 37 | return command; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/exception/IllegalConfigException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.exception; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | @SuppressWarnings("serial") 20 | public class IllegalConfigException extends AppException { 21 | 22 | public IllegalConfigException(String fileName) { 23 | super("ESCC0004", fileName); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/io/CsvSupport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.io; 15 | 16 | import com.smoothcsv.csv.prop.CsvProperties; 17 | import com.smoothcsv.csv.reader.CsvReadOption; 18 | 19 | /** 20 | * @author kohii 21 | */ 22 | public class CsvSupport { 23 | 24 | public static final CsvProperties TSV_PROPERTIES = CsvProperties.of('\t'); 25 | 26 | public static final CsvReadOption SKIP_EMPTYROW_OPTION = CsvReadOption.DEFAULT 27 | .withSkipEmptyLines(true) 28 | .withSkipCommentLines(true); 29 | } 30 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/menu/IParentMenu.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.menu; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public interface IParentMenu extends IMenu { 20 | 21 | void addChild(IMenu menu); 22 | 23 | void addSeparator(); 24 | } 25 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/modular/ModuleEntryPoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.modular; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public interface ModuleEntryPoint { 20 | 21 | ModuleManifest getManifest(); 22 | 23 | void activate(ModuleManifest manifest); 24 | } 25 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/modular/ModuleManifest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.modular; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Getter; 18 | import lombok.Builder; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | @Getter 24 | @Builder 25 | public class ModuleManifest { 26 | private final String name; 27 | private final String[] dependencies; 28 | private final String author; 29 | private final Language[] supportedLanguages; 30 | 31 | @AllArgsConstructor 32 | @Getter 33 | public static class Language { 34 | public static final Language EN = new Language("en", "English"); 35 | private final String id; 36 | private final String name; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/preference/PrefPage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.preference; 15 | 16 | import javax.swing.JPanel; 17 | 18 | import lombok.AllArgsConstructor; 19 | import lombok.Getter; 20 | import lombok.NoArgsConstructor; 21 | 22 | /** 23 | * @author kohii 24 | */ 25 | @AllArgsConstructor 26 | @NoArgsConstructor 27 | @Getter 28 | public class PrefPage { 29 | private String titleKey; 30 | private Class prefCompClass; 31 | 32 | @Override 33 | public String toString() { 34 | return titleKey; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/preference/PrefTitleLabel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.preference; 15 | 16 | import java.awt.Font; 17 | 18 | import javax.swing.BorderFactory; 19 | import javax.swing.JLabel; 20 | import javax.swing.border.Border; 21 | 22 | /** 23 | * @author kohii 24 | */ 25 | @SuppressWarnings("serial") 26 | public class PrefTitleLabel extends JLabel { 27 | 28 | private static Border border = BorderFactory.createEmptyBorder(14, 0, 2, 0); 29 | 30 | public PrefTitleLabel(String text) { 31 | super(text); 32 | 33 | Font font = getFont(); 34 | setFont(font.deriveFont(font.getSize() * 1.26f)); 35 | setBorder(border); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/selector/AllSelector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.selector; 15 | 16 | import com.smoothcsv.framework.component.support.SmoothComponent; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public class AllSelector implements CssSelector { 22 | 23 | private static AllSelector instatnce; 24 | 25 | public static AllSelector get() { 26 | return instatnce; 27 | } 28 | 29 | private AllSelector() {} 30 | 31 | @Override 32 | public boolean matches(SmoothComponent component) { 33 | return true; 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return "*"; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/selector/CssSelector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.selector; 15 | 16 | import com.smoothcsv.framework.component.support.SmoothComponent; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public interface CssSelector { 22 | 23 | boolean matches(SmoothComponent component); 24 | } 25 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/selector/FocusOwnerSelector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.selector; 15 | 16 | import com.smoothcsv.framework.component.support.SCFocusManager; 17 | import com.smoothcsv.framework.component.support.SmoothComponent; 18 | import lombok.EqualsAndHashCode; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | @EqualsAndHashCode 24 | public class FocusOwnerSelector implements CssSelector { 25 | 26 | public FocusOwnerSelector() {} 27 | 28 | @Override 29 | public boolean matches(SmoothComponent component) { 30 | return SCFocusManager.getFocusOwner() == component; 31 | } 32 | 33 | @Override 34 | public String toString() { 35 | return ":focus"; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/util/DigestUtils.java: -------------------------------------------------------------------------------- 1 | package com.smoothcsv.framework.util; 2 | 3 | import java.security.MessageDigest; 4 | import java.security.NoSuchAlgorithmException; 5 | 6 | import javax.xml.bind.DatatypeConverter; 7 | 8 | /** 9 | * @author kohii 10 | */ 11 | public class DigestUtils { 12 | 13 | public static String md5Hex(String input) throws NoSuchAlgorithmException { 14 | MessageDigest md = MessageDigest.getInstance("MD5"); 15 | byte[] result = md.digest(input.getBytes()); 16 | return DatatypeConverter.printHexBinary(result); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/util/InvocationUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.util; 15 | 16 | import com.smoothcsv.framework.error.ErrorHandlerFactory; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public class InvocationUtils { 22 | 23 | public static void run(Runnable runnable) { 24 | try { 25 | runnable.run(); 26 | } catch (Throwable t) { 27 | ErrorHandlerFactory.getErrorHandler().handle(t); 28 | } 29 | } 30 | 31 | public static void runAsync(Runnable runnable) { 32 | new Thread(runnable).start(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/java/com/smoothcsv/framework/util/SCPropertiesFileUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.framework.util; 15 | 16 | 17 | /** 18 | * @author kohii 19 | */ 20 | public class SCPropertiesFileUtils { 21 | 22 | // public static Map read(InputStream in) throws IOException { 23 | // Map map = new HashMap<>(); 24 | // try (BufferedReader reader = new BufferedReader(new InputStreamReader(in))) { 25 | // String line; 26 | // while ((line = reader.readLine()) != null) { 27 | // map.put(null, null); 28 | // } 29 | // } 30 | // } 31 | } 32 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/resources/com/smoothcsv/framework/component/dialog/DialogOperation.properties: -------------------------------------------------------------------------------- 1 | OK=OK 2 | CANCEL=Cancel 3 | YES=Yes 4 | NO=No -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/resources/com/smoothcsv/framework/component/dialog/DialogOperation_ja.properties: -------------------------------------------------------------------------------- 1 | OK=OK 2 | CANCEL=\u30ad\u30e3\u30f3\u30bb\u30eb 3 | YES=\u306f\u3044 4 | NO=\u3044\u3044\u3048 -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/resources/img/progress.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-framework/src/main/resources/img/progress.gif -------------------------------------------------------------------------------- /smoothcsv-framework/src/main/resources/message.properties: -------------------------------------------------------------------------------- 1 | #ERROR 2 | ESCC0001=Error 3 | ESCC0002=Could not load module.\uFF08{0}\uFF09 4 | ESCC0003=Out of memory error. 5 | ESCC0004=Invalid settings. {0} 6 | 7 | #WARN 8 | WSCC0001=Could not open file. {0} 9 | WSCC0002=File not found. {0} 10 | WSCC0003=Failed to read file. {0} 11 | WSCC0004={0} already exists.\nDo you want to replace it? 12 | WSCC0005=Cannot overwrite the file. 13 | WSCC0006=File not found. {0} 14 | WSCC0007={0} must be less than {1} characters. 15 | WSCC0008={0} must be at least {1} characters. 16 | WSCC0009={0} is required. -------------------------------------------------------------------------------- /smoothcsv-framework/src/test/java/file.csv: -------------------------------------------------------------------------------- 1 | "file.howToDetectProperties","auto" 2 | "file.alertOnOpeningHugeFile","true" 3 | "file.alertThreshold","50" 4 | "file.defaultRowSize","5" 5 | "file.defaultColumnSize","5" 6 | -------------------------------------------------------------------------------- /smoothcsv-framework/src/test/java/file.prefs: -------------------------------------------------------------------------------- 1 | file.howToDetectProperties=auto 2 | file.alertOnOpeningHugeFile=true 3 | file.alertThreshold=50 4 | file.defaultRowSize=5 5 | file.defaultColumnSize=5 6 | -------------------------------------------------------------------------------- /smoothcsv-launcher-mac/SmoothCSV.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-launcher-mac/SmoothCSV.icns -------------------------------------------------------------------------------- /smoothcsv-launcher-mac/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'application' 3 | id "edu.sc.seis.macAppBundle" version "2.3.0" 4 | } 5 | 6 | dependencies { 7 | compile project(':smoothcsv-framework') 8 | compile project(':smoothcsv-app-modules:smoothcsv-core') 9 | compile project(':smoothcsv-app-modules:smoothcsv-mac') 10 | compile project(':smoothcsv-app-modules:smoothcsv-ja') 11 | } 12 | 13 | application { 14 | mainClassName = 'com.smoothcsv.SmoothCSV' 15 | } 16 | 17 | macAppBundle { 18 | mainClassName = 'com.smoothcsv.SmoothCSV' 19 | appName = 'SmoothCSV' 20 | dmgName = "smoothcsv-${project.version}-macos" 21 | icon = 'SmoothCSV.icns' 22 | bundleJRE = true 23 | jreHome = System.getenv('JAVA_HOME') 24 | bundleExtras.put('CFBundleDocumentTypes', [ 25 | [ 26 | CFBundleTypeExtensions: ['csv', 'CSV', 'tsv', 'TSV', 'txt', 'TXT', '*'], 27 | CFBundleTypeName : 'CSV Files', 28 | CFBundleTypeRole : 'Editor', 29 | CFBundleTypeOSTypes : ['????'] 30 | ] 31 | ]) 32 | } -------------------------------------------------------------------------------- /smoothcsv-launcher-mac/src/main/java/com/smoothcsv/SmoothCSV.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv; 15 | 16 | import com.smoothcsv.core.SmoothCsvApp; 17 | import com.smoothcsv.framework.Env; 18 | import com.smoothcsv.framework.SCApplication; 19 | import com.smoothcsv.framework.util.DirectoryResolver; 20 | 21 | /** 22 | * @author kohii 23 | */ 24 | public class SmoothCSV { 25 | 26 | public static void main(String[] args) { 27 | DirectoryResolver directoryResolver = DirectoryResolver.instance(); 28 | System.setProperty( 29 | "smoothcsv.logDir", 30 | directoryResolver.getLogDirectory().getAbsolutePath()); 31 | 32 | SCApplication application = new SmoothCsvApp(Env.OS_MAC, false); 33 | application.launch(args); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /smoothcsv-launcher-mac/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ${smoothcsv.logDir}/app.log 5 | 6 | ${smoothcsv.logDir}/app.%i.log 7 | 1 8 | 2 9 | 10 | 11 | 1MB 12 | 13 | 14 | %d{yy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /smoothcsv-launcher-win/src/main/resources/app.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-launcher-win/src/main/resources/app.ico -------------------------------------------------------------------------------- /smoothcsv-launcher-win/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ${smoothcsv.logDir}/app.log 5 | 6 | ${smoothcsv.logDir}/app.%i.log 7 | 1 8 | 2 9 | 10 | 11 | 1MB 12 | 13 | 14 | %d{yy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /smoothcsv-swing/README.md: -------------------------------------------------------------------------------- 1 | smoothcsv-swing 2 | =============== 3 | 4 | Swing components for SmoothCSV. 5 | -------------------------------------------------------------------------------- /smoothcsv-swing/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java-library' 2 | 3 | dependencies { 4 | compile project(':smoothcsv-commons') 5 | testImplementation 'junit:junit:4.10' 6 | } 7 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/components/ExRadioButton.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.components; 15 | 16 | import javax.swing.JRadioButton; 17 | 18 | import lombok.Getter; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | @SuppressWarnings("serial") 24 | public class ExRadioButton extends JRadioButton { 25 | 26 | @Getter 27 | private V value; 28 | 29 | 30 | public ExRadioButton(V value) { 31 | this.value = value; 32 | } 33 | 34 | public ExRadioButton(V value, String text) { 35 | super(text); 36 | this.value = value; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/components/PlainLabel.java: -------------------------------------------------------------------------------- 1 | package com.smoothcsv.swing.components; 2 | 3 | import javax.swing.Icon; 4 | import javax.swing.JLabel; 5 | 6 | import com.smoothcsv.swing.utils.SwingUtils; 7 | 8 | /** 9 | * @author kohii 10 | */ 11 | public class PlainLabel extends JLabel { 12 | 13 | public PlainLabel(String text, Icon icon, int horizontalAlignment) { 14 | super(text, icon, horizontalAlignment); 15 | SwingUtils.disableHtml(this); 16 | } 17 | 18 | public PlainLabel(String text, int horizontalAlignment) { 19 | super(text, horizontalAlignment); 20 | SwingUtils.disableHtml(this); 21 | } 22 | 23 | public PlainLabel(String text) { 24 | super(text); 25 | SwingUtils.disableHtml(this); 26 | } 27 | 28 | public PlainLabel(Icon image, int horizontalAlignment) { 29 | super(image, horizontalAlignment); 30 | SwingUtils.disableHtml(this); 31 | } 32 | 33 | public PlainLabel(Icon image) { 34 | super(image); 35 | SwingUtils.disableHtml(this); 36 | } 37 | 38 | public PlainLabel() { 39 | SwingUtils.disableHtml(this); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/components/text/ExTextPaneConfig.java: -------------------------------------------------------------------------------- 1 | package com.smoothcsv.swing.components.text; 2 | 3 | import java.awt.Color; 4 | 5 | import lombok.AllArgsConstructor; 6 | import lombok.Getter; 7 | import lombok.Setter; 8 | 9 | /** 10 | * @author kohii 11 | */ 12 | @AllArgsConstructor 13 | @Setter 14 | public class ExTextPaneConfig { 15 | 16 | @Getter 17 | private Color color; 18 | 19 | @Getter 20 | private boolean wordWrap; 21 | 22 | private boolean showSpace; 23 | private boolean showTab; 24 | private boolean showEOL; 25 | private boolean showEOF; 26 | 27 | public boolean showSpace() { 28 | return showSpace; 29 | } 30 | 31 | public boolean showTab() { 32 | return showTab; 33 | } 34 | 35 | public boolean showEOL() { 36 | return showEOL; 37 | } 38 | 39 | public boolean showEOF() { 40 | return showEOF; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/constants/TableOrientation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.constants; 15 | 16 | public enum TableOrientation { 17 | ROW, COLUMN 18 | } 19 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/event/HoveredCellChangeEvent.java: -------------------------------------------------------------------------------- 1 | package com.smoothcsv.swing.event; 2 | 3 | import lombok.Value; 4 | 5 | /** 6 | * @author kohii 7 | */ 8 | @Value 9 | public class HoveredCellChangeEvent { 10 | int oldRow; 11 | int oldColumn; 12 | 13 | int newRow; 14 | int newColumn; 15 | 16 | public boolean isOutOfTableBounds() { 17 | return newRow < 0 || newColumn < 0; 18 | } 19 | 20 | public boolean isRowChanged() { 21 | return oldRow != newRow; 22 | } 23 | 24 | public boolean isColumnChanged() { 25 | return oldColumn != newColumn; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/AbstractGridSheetComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet; 15 | 16 | import javax.swing.JComponent; 17 | 18 | public abstract class AbstractGridSheetComponent extends JComponent { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/GridSheetCellEditor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet; 15 | 16 | import javax.swing.CellEditor; 17 | import javax.swing.JComponent; 18 | 19 | public interface GridSheetCellEditor extends CellEditor { 20 | 21 | boolean prepare(GridSheetTable table, Object value, boolean isSelected, int row, int column); 22 | 23 | JComponent getEditorComponent(); 24 | 25 | JComponent getOuterEditorComponent(); 26 | } 27 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/GridSheetScrollPaneConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet; 15 | 16 | public interface GridSheetScrollPaneConstants { 17 | 18 | String FROZEN_LEFTUPPER_VIEWPORT = "FROZEN_LEFTUPPER_VIEWPORT"; 19 | String FROZEN_LEFT_VIEWPORT = "FROZEN_LEFT_VIEWPORT"; 20 | String FROZEN_UPPER_VIEWPORT = "FROZEN_UPPER_VIEWPORT"; 21 | 22 | String FROZEN_COLUMN_HEADER = "FROZEN_COLUMN_HEADER"; 23 | String FROZEN_ROW_HEADER = "FROZEN_ROW_HEADER"; 24 | } 25 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/event/GridSheetColumnHeaderSelectionListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet.event; 15 | 16 | public interface GridSheetColumnHeaderSelectionListener extends GridSheetHeaderSelectionListener { 17 | } 18 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/event/GridSheetCornerHeaderSelectionListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet.event; 15 | 16 | public interface GridSheetCornerHeaderSelectionListener extends GridSheetHeaderSelectionListener { 17 | } 18 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/event/GridSheetFocusListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet.event; 15 | 16 | import java.util.EventListener; 17 | 18 | public interface GridSheetFocusListener extends EventListener { 19 | void valueChanged(GridSheetFocusEvent e); 20 | } 21 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/event/GridSheetHeaderSelectionListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet.event; 15 | 16 | import java.util.EventListener; 17 | 18 | public interface GridSheetHeaderSelectionListener extends EventListener { 19 | 20 | void headersSelectionChanged(GridSheetHeaderSelectionEvent e); 21 | } 22 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/event/GridSheetModelListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet.event; 15 | 16 | 17 | public interface GridSheetModelListener extends java.util.EventListener { 18 | 19 | public void tableChanged(GridSheetModelEvent e); 20 | 21 | /** 22 | * Tells listeners that a column was added to the model. 23 | */ 24 | public void columnAdded(GridSheetColumnModelEvent e); 25 | 26 | /** 27 | * Tells listeners that a column was removed from the model. 28 | */ 29 | public void columnRemoved(GridSheetColumnModelEvent e); 30 | } 31 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/event/GridSheetRowHeaderSelectionListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet.event; 15 | 16 | public interface GridSheetRowHeaderSelectionListener extends GridSheetHeaderSelectionListener { 17 | } 18 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/event/GridSheetSelectionListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet.event; 15 | 16 | import java.util.EventListener; 17 | 18 | public interface GridSheetSelectionListener extends EventListener { 19 | void selectionChanged(GridSheetSelectionEvent e); 20 | } 21 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/model/CellConsumer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet.model; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public interface CellConsumer { 20 | 21 | void accept(int row, int column); 22 | } 23 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/model/GridSheetCell.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet.model; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public class GridSheetCell { 20 | 21 | public final int row; 22 | public final int column; 23 | 24 | public GridSheetCell(int row, int column) { 25 | this.row = row; 26 | this.column = column; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/model/GridSheetSelectionInterval.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet.model; 15 | 16 | public class GridSheetSelectionInterval { 17 | 18 | int from; 19 | int to; 20 | 21 | public GridSheetSelectionInterval(int from, int to) { 22 | this.from = from; 23 | this.to = to; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/model/IGridSheetModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet.model; 15 | 16 | import java.util.function.Consumer; 17 | 18 | import com.smoothcsv.swing.gridsheet.event.GridSheetStructureEvent; 19 | 20 | /** 21 | * @author kohii 22 | */ 23 | public interface IGridSheetModel extends IGridSheetData, IGridSheetStructure { 24 | 25 | 26 | // Listeners -------------------- 27 | 28 | void addStructureChangeListener(Consumer l); 29 | 30 | void removeStructureChangeListener(Consumer l); 31 | } 32 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/renderer/GridSheetCellRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet.renderer; 15 | 16 | import java.awt.Component; 17 | 18 | import com.smoothcsv.swing.gridsheet.GridSheetTable; 19 | 20 | public interface GridSheetCellRenderer { 21 | 22 | Component getGridCellRendererComponent(GridSheetTable table, Object value, boolean isSelected, 23 | boolean hasFocus, int row, int column); 24 | } 25 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/renderer/GridSheetColorProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet.renderer; 15 | 16 | import java.awt.Color; 17 | 18 | /** 19 | * @author kohii 20 | */ 21 | public interface GridSheetColorProvider { 22 | 23 | Color getRuleLineColor(); 24 | 25 | Color getFrozenLineColor(); 26 | 27 | Color getSelectionColor(); 28 | 29 | Color getSelectionBorderColor(); 30 | } 31 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/gridsheet/renderer/GridSheetHeaderRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.gridsheet.renderer; 15 | 16 | import java.awt.Component; 17 | 18 | import com.smoothcsv.swing.gridsheet.AbstractGridSheetHeaderComponent; 19 | 20 | public interface GridSheetHeaderRenderer { 21 | 22 | Component getGridCellRendererComponent(AbstractGridSheetHeaderComponent header, Object value, 23 | boolean isSelected, boolean hasFocus, int index); 24 | } 25 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/table/ExTableCellValueExtracter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.table; 15 | 16 | 17 | /** 18 | * @author kohii 19 | */ 20 | public interface ExTableCellValueExtracter extends ReadOnlyExTableCellValueExtracter { 21 | 22 | void setValue(Object value, T rowData, ExTableColumn column, int rowIndex, int columnIndex); 23 | } 24 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/table/ExTableRowFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.table; 15 | 16 | /** 17 | * @author kohii 18 | */ 19 | public interface ExTableRowFilter { 20 | 21 | boolean include(T rowData, int index); 22 | } 23 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/table/ReadOnlyExTableCellValueExtracter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.table; 15 | 16 | 17 | /** 18 | * @author kohii 19 | */ 20 | public interface ReadOnlyExTableCellValueExtracter { 21 | 22 | Object getValue(T rowData, ExTableColumn column, int rowIndex, int columnIndex); 23 | } 24 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/java/com/smoothcsv/swing/utils/JTreeUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 kohii 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | */ 14 | package com.smoothcsv.swing.utils; 15 | 16 | import javax.swing.JTree; 17 | 18 | public class JTreeUtils { 19 | 20 | public static void collapseAll(JTree tree) { 21 | int row = tree.getRowCount() - 1; 22 | while (row >= 0) { 23 | tree.collapseRow(row); 24 | row--; 25 | } 26 | } 27 | 28 | public static void expandAll(JTree tree) { 29 | int row = 0; 30 | while (row < tree.getRowCount()) { 31 | tree.expandRow(row); 32 | row++; 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/resources/font-awesome-4.7.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-swing/src/main/resources/font-awesome-4.7.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-swing/src/main/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-swing/src/main/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-swing/src/main/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /smoothcsv-swing/src/main/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv-swing/src/main/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /smoothcsv_icon.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kohii/smoothcsv2/aef317d6e7ed5fd8748b135c37f9a2e22b092382/smoothcsv_icon.sketch -------------------------------------------------------------------------------- /update_version.txt: -------------------------------------------------------------------------------- 1 | ./gradlew updateAppVersion -PnewVersion=${version} 2 | 3 | git add . 4 | git commit -m "Update version to ${version}" 5 | 6 | git tag v${version} 7 | git push origin --tags --------------------------------------------------------------------------------