diff --git a/com.hazard157.prisex24/META-INF/MANIFEST.MF b/com.hazard157.prisex24/META-INF/MANIFEST.MF index 7f6f868..ca5fcb3 100644 --- a/com.hazard157.prisex24/META-INF/MANIFEST.MF +++ b/com.hazard157.prisex24/META-INF/MANIFEST.MF @@ -10,15 +10,24 @@ Export-Package: com.hazard157.prisex24, com.hazard157.prisex24.devel, com.hazard157.prisex24.e4.addons, com.hazard157.prisex24.e4.services.currep, + com.hazard157.prisex24.e4.services.psx, + com.hazard157.prisex24.e4.services.selsvins, com.hazard157.prisex24.e4.uiparts, com.hazard157.prisex24.e4.uiparts.episodes, com.hazard157.prisex24.e4.uiparts.refbooks, + com.hazard157.prisex24.glib.dialogs, + com.hazard157.prisex24.glib.epframes, com.hazard157.prisex24.glib.frasel, com.hazard157.prisex24.glib.frview, com.hazard157.prisex24.glib.frview.impl, com.hazard157.prisex24.m5, + com.hazard157.prisex24.m5.episodes, + com.hazard157.prisex24.m5.frames, + com.hazard157.prisex24.m5.std, com.hazard157.prisex24.m5.tags, - com.hazard157.prisex24.m5.todos + com.hazard157.prisex24.m5.todos, + com.hazard157.prisex24.utils, + com.hazard157.prisex24.valeds.frames Bundle-Activator: com.hazard157.prisex24.Activator Bundle-Vendor: HAZARD157 Require-Bundle: javax.annotation, diff --git a/com.hazard157.prisex24/fragment.e4xmi b/com.hazard157.prisex24/fragment.e4xmi index 060de4c..a475d6a 100644 --- a/com.hazard157.prisex24/fragment.e4xmi +++ b/com.hazard157.prisex24/fragment.e4xmi @@ -8,13 +8,18 @@ + - + + + + + @@ -40,4 +45,7 @@ + + + diff --git a/com.hazard157.prisex24/icons/gif-create.png b/com.hazard157.prisex24/icons/gif-create.png new file mode 100644 index 0000000..dc26e24 Binary files /dev/null and b/com.hazard157.prisex24/icons/gif-create.png differ diff --git a/com.hazard157.prisex24/icons/gif-info.png b/com.hazard157.prisex24/icons/gif-info.png new file mode 100644 index 0000000..ba4ed37 Binary files /dev/null and b/com.hazard157.prisex24/icons/gif-info.png differ diff --git a/com.hazard157.prisex24/icons/gif-recreate-all.png b/com.hazard157.prisex24/icons/gif-recreate-all.png new file mode 100644 index 0000000..1f5d1ac Binary files /dev/null and b/com.hazard157.prisex24/icons/gif-recreate-all.png differ diff --git a/com.hazard157.prisex24/icons/gif-remove.png b/com.hazard157.prisex24/icons/gif-remove.png new file mode 100644 index 0000000..b72d79d Binary files /dev/null and b/com.hazard157.prisex24/icons/gif-remove.png differ diff --git a/com.hazard157.prisex24/icons/gif-test.png b/com.hazard157.prisex24/icons/gif-test.png new file mode 100644 index 0000000..9527689 Binary files /dev/null and b/com.hazard157.prisex24/icons/gif-test.png differ diff --git a/com.hazard157.prisex24/icons/is128x128/gif-create.png b/com.hazard157.prisex24/icons/is128x128/gif-create.png new file mode 100644 index 0000000..2963666 Binary files /dev/null and b/com.hazard157.prisex24/icons/is128x128/gif-create.png differ diff --git a/com.hazard157.prisex24/icons/is128x128/gif-info.png b/com.hazard157.prisex24/icons/is128x128/gif-info.png new file mode 100644 index 0000000..b7d5143 Binary files /dev/null and b/com.hazard157.prisex24/icons/is128x128/gif-info.png differ diff --git a/com.hazard157.prisex24/icons/is128x128/gif-recreate-all.png b/com.hazard157.prisex24/icons/is128x128/gif-recreate-all.png new file mode 100644 index 0000000..6355e37 Binary files /dev/null and b/com.hazard157.prisex24/icons/is128x128/gif-recreate-all.png differ diff --git a/com.hazard157.prisex24/icons/is128x128/gif-remove.png b/com.hazard157.prisex24/icons/is128x128/gif-remove.png new file mode 100644 index 0000000..5667eed Binary files /dev/null and b/com.hazard157.prisex24/icons/is128x128/gif-remove.png differ diff --git a/com.hazard157.prisex24/icons/is128x128/gif-test.png b/com.hazard157.prisex24/icons/is128x128/gif-test.png new file mode 100644 index 0000000..a167fe2 Binary files /dev/null and b/com.hazard157.prisex24/icons/is128x128/gif-test.png differ diff --git a/com.hazard157.prisex24/icons/is128x128/work-with-frames.png b/com.hazard157.prisex24/icons/is128x128/work-with-frames.png new file mode 100644 index 0000000..091ab77 Binary files /dev/null and b/com.hazard157.prisex24/icons/is128x128/work-with-frames.png differ diff --git a/com.hazard157.prisex24/icons/is16x16/gif-create.png b/com.hazard157.prisex24/icons/is16x16/gif-create.png new file mode 100644 index 0000000..949fa25 Binary files /dev/null and b/com.hazard157.prisex24/icons/is16x16/gif-create.png differ diff --git a/com.hazard157.prisex24/icons/is16x16/gif-info.png b/com.hazard157.prisex24/icons/is16x16/gif-info.png new file mode 100644 index 0000000..e4b3b58 Binary files /dev/null and b/com.hazard157.prisex24/icons/is16x16/gif-info.png differ diff --git a/com.hazard157.prisex24/icons/is16x16/gif-recreate-all.png b/com.hazard157.prisex24/icons/is16x16/gif-recreate-all.png new file mode 100644 index 0000000..712cea0 Binary files /dev/null and b/com.hazard157.prisex24/icons/is16x16/gif-recreate-all.png differ diff --git a/com.hazard157.prisex24/icons/is16x16/gif-remove.png b/com.hazard157.prisex24/icons/is16x16/gif-remove.png new file mode 100644 index 0000000..b2056c6 Binary files /dev/null and b/com.hazard157.prisex24/icons/is16x16/gif-remove.png differ diff --git a/com.hazard157.prisex24/icons/is16x16/gif-test.png b/com.hazard157.prisex24/icons/is16x16/gif-test.png new file mode 100644 index 0000000..0e0cf7b Binary files /dev/null and b/com.hazard157.prisex24/icons/is16x16/gif-test.png differ diff --git a/com.hazard157.prisex24/icons/is16x16/work-with-frames.png b/com.hazard157.prisex24/icons/is16x16/work-with-frames.png new file mode 100644 index 0000000..d1db41f Binary files /dev/null and b/com.hazard157.prisex24/icons/is16x16/work-with-frames.png differ diff --git a/com.hazard157.prisex24/icons/is24x24/gif-create.png b/com.hazard157.prisex24/icons/is24x24/gif-create.png new file mode 100644 index 0000000..6beb778 Binary files /dev/null and b/com.hazard157.prisex24/icons/is24x24/gif-create.png differ diff --git a/com.hazard157.prisex24/icons/is24x24/gif-info.png b/com.hazard157.prisex24/icons/is24x24/gif-info.png new file mode 100644 index 0000000..d8fa51d Binary files /dev/null and b/com.hazard157.prisex24/icons/is24x24/gif-info.png differ diff --git a/com.hazard157.prisex24/icons/is24x24/gif-recreate-all.png b/com.hazard157.prisex24/icons/is24x24/gif-recreate-all.png new file mode 100644 index 0000000..b391507 Binary files /dev/null and b/com.hazard157.prisex24/icons/is24x24/gif-recreate-all.png differ diff --git a/com.hazard157.prisex24/icons/is24x24/gif-remove.png b/com.hazard157.prisex24/icons/is24x24/gif-remove.png new file mode 100644 index 0000000..af4f4cb Binary files /dev/null and b/com.hazard157.prisex24/icons/is24x24/gif-remove.png differ diff --git a/com.hazard157.prisex24/icons/is24x24/gif-test.png b/com.hazard157.prisex24/icons/is24x24/gif-test.png new file mode 100644 index 0000000..5dc10b7 Binary files /dev/null and b/com.hazard157.prisex24/icons/is24x24/gif-test.png differ diff --git a/com.hazard157.prisex24/icons/is24x24/work-with-frames.png b/com.hazard157.prisex24/icons/is24x24/work-with-frames.png new file mode 100644 index 0000000..a6af398 Binary files /dev/null and b/com.hazard157.prisex24/icons/is24x24/work-with-frames.png differ diff --git a/com.hazard157.prisex24/icons/is32x32/gif-create.png b/com.hazard157.prisex24/icons/is32x32/gif-create.png new file mode 100644 index 0000000..7150f7c Binary files /dev/null and b/com.hazard157.prisex24/icons/is32x32/gif-create.png differ diff --git a/com.hazard157.prisex24/icons/is32x32/gif-info.png b/com.hazard157.prisex24/icons/is32x32/gif-info.png new file mode 100644 index 0000000..ee95079 Binary files /dev/null and b/com.hazard157.prisex24/icons/is32x32/gif-info.png differ diff --git a/com.hazard157.prisex24/icons/is32x32/gif-recreate-all.png b/com.hazard157.prisex24/icons/is32x32/gif-recreate-all.png new file mode 100644 index 0000000..821d545 Binary files /dev/null and b/com.hazard157.prisex24/icons/is32x32/gif-recreate-all.png differ diff --git a/com.hazard157.prisex24/icons/is32x32/gif-remove.png b/com.hazard157.prisex24/icons/is32x32/gif-remove.png new file mode 100644 index 0000000..fca0a70 Binary files /dev/null and b/com.hazard157.prisex24/icons/is32x32/gif-remove.png differ diff --git a/com.hazard157.prisex24/icons/is32x32/gif-test.png b/com.hazard157.prisex24/icons/is32x32/gif-test.png new file mode 100644 index 0000000..6b056dc Binary files /dev/null and b/com.hazard157.prisex24/icons/is32x32/gif-test.png differ diff --git a/com.hazard157.prisex24/icons/is32x32/work-with-frames.png b/com.hazard157.prisex24/icons/is32x32/work-with-frames.png new file mode 100644 index 0000000..55a1c40 Binary files /dev/null and b/com.hazard157.prisex24/icons/is32x32/work-with-frames.png differ diff --git a/com.hazard157.prisex24/icons/is48x48/gif-create.png b/com.hazard157.prisex24/icons/is48x48/gif-create.png new file mode 100644 index 0000000..e7c27f4 Binary files /dev/null and b/com.hazard157.prisex24/icons/is48x48/gif-create.png differ diff --git a/com.hazard157.prisex24/icons/is48x48/gif-info.png b/com.hazard157.prisex24/icons/is48x48/gif-info.png new file mode 100644 index 0000000..3f238a7 Binary files /dev/null and b/com.hazard157.prisex24/icons/is48x48/gif-info.png differ diff --git a/com.hazard157.prisex24/icons/is48x48/gif-recreate-all.png b/com.hazard157.prisex24/icons/is48x48/gif-recreate-all.png new file mode 100644 index 0000000..a196876 Binary files /dev/null and b/com.hazard157.prisex24/icons/is48x48/gif-recreate-all.png differ diff --git a/com.hazard157.prisex24/icons/is48x48/gif-remove.png b/com.hazard157.prisex24/icons/is48x48/gif-remove.png new file mode 100644 index 0000000..c1ba653 Binary files /dev/null and b/com.hazard157.prisex24/icons/is48x48/gif-remove.png differ diff --git a/com.hazard157.prisex24/icons/is48x48/gif-test.png b/com.hazard157.prisex24/icons/is48x48/gif-test.png new file mode 100644 index 0000000..d657e4b Binary files /dev/null and b/com.hazard157.prisex24/icons/is48x48/gif-test.png differ diff --git a/com.hazard157.prisex24/icons/is48x48/work-with-frames.png b/com.hazard157.prisex24/icons/is48x48/work-with-frames.png new file mode 100644 index 0000000..f1e646d Binary files /dev/null and b/com.hazard157.prisex24/icons/is48x48/work-with-frames.png differ diff --git a/com.hazard157.prisex24/icons/is64x64/gif-create.png b/com.hazard157.prisex24/icons/is64x64/gif-create.png new file mode 100644 index 0000000..0736819 Binary files /dev/null and b/com.hazard157.prisex24/icons/is64x64/gif-create.png differ diff --git a/com.hazard157.prisex24/icons/is64x64/gif-info.png b/com.hazard157.prisex24/icons/is64x64/gif-info.png new file mode 100644 index 0000000..8478fc5 Binary files /dev/null and b/com.hazard157.prisex24/icons/is64x64/gif-info.png differ diff --git a/com.hazard157.prisex24/icons/is64x64/gif-recreate-all.png b/com.hazard157.prisex24/icons/is64x64/gif-recreate-all.png new file mode 100644 index 0000000..967d400 Binary files /dev/null and b/com.hazard157.prisex24/icons/is64x64/gif-recreate-all.png differ diff --git a/com.hazard157.prisex24/icons/is64x64/gif-remove.png b/com.hazard157.prisex24/icons/is64x64/gif-remove.png new file mode 100644 index 0000000..dd0c82f Binary files /dev/null and b/com.hazard157.prisex24/icons/is64x64/gif-remove.png differ diff --git a/com.hazard157.prisex24/icons/is64x64/gif-test.png b/com.hazard157.prisex24/icons/is64x64/gif-test.png new file mode 100644 index 0000000..e232fbc Binary files /dev/null and b/com.hazard157.prisex24/icons/is64x64/gif-test.png differ diff --git a/com.hazard157.prisex24/icons/is64x64/work-with-frames.png b/com.hazard157.prisex24/icons/is64x64/work-with-frames.png new file mode 100644 index 0000000..c9e5510 Binary files /dev/null and b/com.hazard157.prisex24/icons/is64x64/work-with-frames.png differ diff --git a/com.hazard157.prisex24/icons/is96x96/gif-create.png b/com.hazard157.prisex24/icons/is96x96/gif-create.png new file mode 100644 index 0000000..9c96430 Binary files /dev/null and b/com.hazard157.prisex24/icons/is96x96/gif-create.png differ diff --git a/com.hazard157.prisex24/icons/is96x96/gif-info.png b/com.hazard157.prisex24/icons/is96x96/gif-info.png new file mode 100644 index 0000000..5a6bafd Binary files /dev/null and b/com.hazard157.prisex24/icons/is96x96/gif-info.png differ diff --git a/com.hazard157.prisex24/icons/is96x96/gif-recreate-all.png b/com.hazard157.prisex24/icons/is96x96/gif-recreate-all.png new file mode 100644 index 0000000..35eb14c Binary files /dev/null and b/com.hazard157.prisex24/icons/is96x96/gif-recreate-all.png differ diff --git a/com.hazard157.prisex24/icons/is96x96/gif-remove.png b/com.hazard157.prisex24/icons/is96x96/gif-remove.png new file mode 100644 index 0000000..b4217bc Binary files /dev/null and b/com.hazard157.prisex24/icons/is96x96/gif-remove.png differ diff --git a/com.hazard157.prisex24/icons/is96x96/gif-test.png b/com.hazard157.prisex24/icons/is96x96/gif-test.png new file mode 100644 index 0000000..9ee1476 Binary files /dev/null and b/com.hazard157.prisex24/icons/is96x96/gif-test.png differ diff --git a/com.hazard157.prisex24/icons/is96x96/work-with-frames.png b/com.hazard157.prisex24/icons/is96x96/work-with-frames.png new file mode 100644 index 0000000..ba552e8 Binary files /dev/null and b/com.hazard157.prisex24/icons/is96x96/work-with-frames.png differ diff --git a/com.hazard157.prisex24/icons/work-with-frames.png b/com.hazard157.prisex24/icons/work-with-frames.png new file mode 100644 index 0000000..928f57a Binary files /dev/null and b/com.hazard157.prisex24/icons/work-with-frames.png differ diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/IPrisex24CoreConstants.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/IPrisex24CoreConstants.java index 4f4f65a..1fc977a 100644 --- a/com.hazard157.prisex24/src/com/hazard157/prisex24/IPrisex24CoreConstants.java +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/IPrisex24CoreConstants.java @@ -1,12 +1,23 @@ package com.hazard157.prisex24; import static com.hazard157.prisex24.IPsxResources.*; +import static org.toxsoft.core.tslib.av.EAtomicType.*; +import static org.toxsoft.core.tslib.av.impl.AvUtils.*; +import static org.toxsoft.core.tslib.av.metainfo.IAvMetaConstants.*; import java.time.*; import org.eclipse.e4.core.contexts.*; +import org.toxsoft.core.tsgui.bricks.actions.*; import org.toxsoft.core.tsgui.graphics.icons.*; +import org.toxsoft.core.tsgui.graphics.image.*; import org.toxsoft.core.tsgui.mws.appinf.*; +import org.toxsoft.core.tslib.av.impl.*; +import org.toxsoft.core.tslib.av.metainfo.*; +import org.toxsoft.core.tslib.av.opset.impl.*; +import org.toxsoft.core.tslib.bricks.apprefs.*; +import org.toxsoft.core.tslib.bricks.strid.coll.*; +import org.toxsoft.core.tslib.bricks.strid.coll.impl.*; import org.toxsoft.core.tslib.utils.*; /** @@ -56,6 +67,64 @@ public interface IPrisex24CoreConstants { String ICONID_FRAMES_PER_SVIN_FORCE_ONE = "frames_per_svin_force-one"; //$NON-NLS-1$ String ICONID_FRAMES_PER_SVIN_ONE_NO_MORE = "frames_per_svin_one-no-more"; //$NON-NLS-1$ String ICONID_FRAMES_PER_SVIN_SELECTED = "frames_per_svin_selected"; //$NON-NLS-1$ + String ICONID_GIF_CREATE = "gif-create"; //$NON-NLS-1$ + String ICONID_GIF_INFO = "gif-info"; //$NON-NLS-1$ + String ICONID_GIF_RECREATE_ALL = "gif-recreate-all"; //$NON-NLS-1$ + String ICONID_GIF_REMOVE = "gif-remove"; //$NON-NLS-1$ + String ICONID_GIF_TEST = "gif-test"; //$NON-NLS-1$ + String ICONID_WORK_WITH_FRAMES = "work-with-frames"; //$NON-NLS-1$ + + // ------------------------------------------------------------------------------------ + // Actions + + String ACTID_GIF_CREATE = PSX_ACT_ID + ".gif_create"; //$NON-NLS-1$ + String ACTID_GIF_INFO = PSX_ACT_ID + ".gif_info"; //$NON-NLS-1$ + String ACTID_GIF_RECREATE_ALL = PSX_ACT_ID + ".gif_recreate_all"; //$NON-NLS-1$ + String ACTID_GIF_REMOVE = PSX_ACT_ID + ".gif_remove"; //$NON-NLS-1$ + String ACTID_GIF_TEST = PSX_ACT_ID + ".gif_test"; //$NON-NLS-1$ + String ACTID_WORK_WITH_FRAMES = PSX_ACT_ID + ".work_with_frames"; //$NON-NLS-1$ + + ITsActionDef ACDEF_GIF_CREATE = TsActionDef.ofPush2( ACTID_GIF_CREATE, // + STR_GIF_CREATE, STR_GIF_CREATE_D, ICONID_GIF_CREATE ); + + ITsActionDef ACDEF_GIF_CREATE_MENU = TsActionDef.ofMenu2( ACTID_GIF_CREATE, // + STR_GIF_CREATE, STR_GIF_CREATE_D, ICONID_GIF_CREATE ); + + ITsActionDef ACDEF_GIF_INFO = TsActionDef.ofPush2( ACTID_GIF_INFO, // + STR_GIF_INFO, STR_GIF_INFO_D, ICONID_GIF_INFO ); + + ITsActionDef ACDEF_GIF_RECREATE_ALL = TsActionDef.ofPush2( ACTID_GIF_RECREATE_ALL, // + STR_GIF_RECREATE_ALL, STR_GIF_RECREATE_ALL_D, ICONID_GIF_RECREATE_ALL ); + + ITsActionDef ACDEF_GIF_REMOVE = TsActionDef.ofPush2( ACTID_GIF_REMOVE, // + STR_GIF_REMOVE, STR_GIF_REMOVE_D, ICONID_GIF_REMOVE ); + + ITsActionDef ACDEF_GIF_TEST = TsActionDef.ofPush2( ACTID_GIF_TEST, // + STR_GIF_TEST, STR_GIF_TEST_D, ICONID_GIF_TEST ); + + ITsActionDef ACDEF_WORK_WITH_FRAMES = TsActionDef.ofPush2( ACTID_WORK_WITH_FRAMES, // + STR_WORK_WITH_FRAMES, STR_WORK_WITH_FRAMES_D, ICONID_WORK_WITH_FRAMES ); + + // ------------------------------------------------------------------------------------ + // Application preferences + + /** + * Preferences bundle specific for HZ library. + */ + String PBID_PSX24_COMMON = PSX_FULL_ID + ".Common"; //$NON-NLS-1$ + + String APREFID_THUMB_SIZE_IN_MENUS = "ThumbSizeInMenus"; //$NON-NLS-1$ + + IDataDef APPREF_THUMB_SIZE_IN_MENUS = DataDef.create( APREFID_THUMB_SIZE_IN_MENUS, VALOBJ, // + TSID_NAME, STR_THUMB_SIZE_IN_MENUS, // + TSID_DESCRIPTION, STR_THUMB_SIZE_IN_MENUS_D, // + TSID_KEEPER_ID, EThumbSize.KEEPER_ID, // + TSID_DEFAULT_VALUE, avValobj( EThumbSize.SZ180 ) // + ); + + IStridablesList ALL_APPREFS = new StridablesList<>( // + APPREF_THUMB_SIZE_IN_MENUS // + ); /** * Constants registration. @@ -66,6 +135,15 @@ static void init( IEclipseContext aWinContext ) { ITsIconManager iconManager = aWinContext.get( ITsIconManager.class ); iconManager.registerStdIconByIds( Activator.PLUGIN_ID, IPrisex24CoreConstants.class, PREFIX_OF_ICON_FIELD_NAME ); // + IAppPreferences aprefs = aWinContext.get( IAppPreferences.class ); + IPrefBundle pb = aprefs.defineBundle( PBID_PSX24_COMMON, OptionSetUtils.createOpSet( // + TSID_NAME, STR_PB_PSX24_COMMON, // + TSID_DESCRIPTION, STR_PB_PSX24_COMMON_D, // + TSID_ICON_ID, ICONID_APP_ICON // + ) ); + for( IDataDef dd : ALL_APPREFS ) { + pb.defineOption( dd ); + } } } diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/IPsxResources.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/IPsxResources.java index 20af92e..0db4cc2 100644 --- a/com.hazard157.prisex24/src/com/hazard157/prisex24/IPsxResources.java +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/IPsxResources.java @@ -7,10 +7,25 @@ */ interface IPsxResources { - /** - * {@link IPrisex24CoreConstants} - */ String STR_APP_INFO = Messages.getString( "STR_APP_INFO" ); //$NON-NLS-1$ String STR_APP_INFO_D = Messages.getString( "STR_APP_INFO_D" ); //$NON-NLS-1$ + String STR_GIF_CREATE = Messages.getString( "STR_GIF_CREATE" ); //$NON-NLS-1$ + String STR_GIF_CREATE_D = Messages.getString( "STR_GIF_CREATE_D" ); //$NON-NLS-1$ + String STR_GIF_INFO = Messages.getString( "STR_GIF_INFO" ); //$NON-NLS-1$ + String STR_GIF_INFO_D = Messages.getString( "STR_GIF_INFO_D" ); //$NON-NLS-1$ + String STR_GIF_RECREATE_ALL = Messages.getString( "STR_GIF_RECREATE_ALL" ); //$NON-NLS-1$ + String STR_GIF_RECREATE_ALL_D = Messages.getString( "STR_GIF_RECREATE_ALL_D" ); //$NON-NLS-1$ + String STR_GIF_REMOVE = Messages.getString( "STR_GIF_REMOVE" ); //$NON-NLS-1$ + String STR_GIF_REMOVE_D = Messages.getString( "STR_GIF_REMOVE_D" ); //$NON-NLS-1$ + String STR_GIF_TEST = Messages.getString( "STR_GIF_TEST" ); //$NON-NLS-1$ + String STR_GIF_TEST_D = Messages.getString( "STR_GIF_TEST_D" ); //$NON-NLS-1$ + String STR_WORK_WITH_FRAMES = Messages.getString( "STR_WORK_WITH_FRAMES" ); //$NON-NLS-1$ + String STR_WORK_WITH_FRAMES_D = Messages.getString( "STR_WORK_WITH_FRAMES_D" ); //$NON-NLS-1$ + + String STR_THUMB_SIZE_IN_MENUS = Messages.getString( "STR_THUMB_SIZE_IN_MENUS" ); //$NON-NLS-1$ + String STR_THUMB_SIZE_IN_MENUS_D = Messages.getString( "STR_THUMB_SIZE_IN_MENUS_D" ); //$NON-NLS-1$ + String STR_PB_PSX24_COMMON = Messages.getString( "STR_PB_PSX24_COMMON" ); //$NON-NLS-1$ + String STR_PB_PSX24_COMMON_D = Messages.getString( "STR_PB_PSX24_COMMON_D" ); //$NON-NLS-1$ + } diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/cofs/ICofsFrames.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/cofs/ICofsFrames.java index edb6536..bfa5c79 100644 --- a/com.hazard157.prisex24/src/com/hazard157/prisex24/cofs/ICofsFrames.java +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/cofs/ICofsFrames.java @@ -17,10 +17,9 @@ *
  • second-aligned JPGs - are files names HH-MM-SS_00.jpg;
  • *
  • all frame JPGs - are files names HH-MM-SS_FF.jpg, where FF have value 00..24.
  • * - * COFS contains only frames of kind 1 and 2. Kind 3 (all frames) contains too many files and are outside of COFS. So - * this interface works only with GIFs and second aligned JPGs. - *

    - * Note: when application asks for frames of kind 3 the warning is logged. + * COFS contains only frames of kind 1 and 2. Kind 3 (all frames) contains too many files and are outside of COFS. + * However this interface partially works only with GIFs and second aligned JPGs. Each method includes + * notes on whether the method supports non-second-aligned frames. * * @author hazard157 */ @@ -30,6 +29,8 @@ public interface ICofsFrames { * Returns frame file if exists. *

    * For {@link IFrame#NONE} returns special file with unknown episode meaning. + *

    + * Supports non-seconds aligned frames they will be found by this method. * * @param aFrame {@link IFrame} - the frame * @return {@link File} - existing frame image file or null @@ -39,6 +40,8 @@ public interface ICofsFrames { /** * Returns all frames with images files. + *

    + * Does not supports non-seconds aligned frames, they are not included in the returned set. * * @param aEpisodeId String - the requested episode ID * @return {@link IList}<{@link IFrame}> - the list of all frames of the episode @@ -47,6 +50,4 @@ public interface ICofsFrames { */ IFramesSet listEpisodeFrames( String aEpisodeId ); - // TODO add non-sec-alignes frames management - } diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/cofs/impl/CofsFrames.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/cofs/impl/CofsFrames.java index 1f3bce6..fc786a9 100644 --- a/com.hazard157.prisex24/src/com/hazard157/prisex24/cofs/impl/CofsFrames.java +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/cofs/impl/CofsFrames.java @@ -27,6 +27,9 @@ class CofsFrames implements ICofsFrames { + // FIXME move to settings? argument of this service? + private static final File NONSECS_ROOT = new File( "/home/.psx/episodes/frames-nonsec/" ); //$NON-NLS-1$ + /** * Episodes resources root directory or null is specified one is not accessible. */ @@ -116,41 +119,75 @@ private void ensureEpisodeFrames( LocalDate aEpisodeDate ) { cachedEpFrames.put( epId, new FramesSet( llCacheAllFrames ) ); } - // ------------------------------------------------------------------------------------ - // ICofsFrames - // - - @Override - public File findFrameFile( IFrame aFrame ) { - TsNullArgumentRtException.checkNull( aFrame ); - if( epsRoot == null ) { + private File internalFindSecAlignedStillFrame( IFrame aFrame ) { + LocalDate ld = EPsxIncidentKind.EPISODE.id2date( aFrame.episodeId() ); + File epDir = new File( epsRoot, ld.toString() ); + File epFramesDir = new File( epDir, SUBDIR_EP_STILL_IMAGES ); + File epCamDir = new File( epFramesDir, aFrame.cameraId() ); + if( !TsFileUtils.isDirReadable( epCamDir ) ) { return null; } - if( aFrame.frameNo() < 0 || !aFrame.isDefined() ) { - return null; + String bareName = PsxCofsUtils.bareSourceFrameFileName( aFrame.frameNo() ); + File frameFile = new File( epCamDir, bareName + '.' + STILL_IMAGE_FILE_EXT ); + if( frameFile.exists() ) { + return frameFile; } + return null; + } + + private File internalFindGifFrame( IFrame aFrame ) { LocalDate ld = EPsxIncidentKind.EPISODE.id2date( aFrame.episodeId() ); File epDir = new File( epsRoot, ld.toString() ); - File epFramesDir; - if( aFrame.isAnimated() ) { - epFramesDir = new File( epDir, SUBDIR_EP_ANIM_IMAGES ); + File epFramesDir = new File( epDir, SUBDIR_EP_ANIM_IMAGES ); + File epCamDir = new File( epFramesDir, aFrame.cameraId() ); + if( !TsFileUtils.isDirReadable( epCamDir ) ) { + return null; } - else { - epFramesDir = new File( epDir, SUBDIR_EP_STILL_IMAGES ); + String bareName = PsxCofsUtils.bareSourceFrameFileName( aFrame.frameNo() ); + File frameFile = new File( epCamDir, bareName + '.' + ANIM_IMAGE_FILE_EXT ); + if( frameFile.exists() ) { + return frameFile; } + return null; + } + + private static File internalFindNonSecFrame( IFrame aFrame ) { + LocalDate ld = EPsxIncidentKind.EPISODE.id2date( aFrame.episodeId() ); + File epFramesDir = new File( NONSECS_ROOT, ld.toString() ); File epCamDir = new File( epFramesDir, aFrame.cameraId() ); if( !TsFileUtils.isDirReadable( epCamDir ) ) { return null; } String bareName = PsxCofsUtils.bareSourceFrameFileName( aFrame.frameNo() ); - String ext = aFrame.isAnimated() ? ANIM_IMAGE_FILE_EXT : STILL_IMAGE_FILE_EXT; - File frameFile = new File( epCamDir, bareName + '.' + ext ); + File frameFile = new File( epCamDir, bareName + '.' + STILL_IMAGE_FILE_EXT ); if( frameFile.exists() ) { return frameFile; } return null; } + // ------------------------------------------------------------------------------------ + // ICofsFrames + // + + @Override + public File findFrameFile( IFrame aFrame ) { + TsNullArgumentRtException.checkNull( aFrame ); + if( epsRoot == null ) { + return null; + } + if( aFrame.frameNo() < 0 || !aFrame.isDefined() ) { + return null; + } + if( aFrame.isAnimated() ) { + return internalFindGifFrame( aFrame ); + } + if( aFrame.isSecAligned() ) { + return internalFindSecAlignedStillFrame( aFrame ); + } + return internalFindNonSecFrame( aFrame ); + } + @Override public IFramesSet listEpisodeFrames( String aEpisodeId ) { LocalDate epDate = EPsxIncidentKind.EPISODE.id2date( aEpisodeId ); diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/addons/AddonPrisex24Behaviour.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/addons/AddonPrisex24Behaviour.java new file mode 100644 index 0000000..8772f84 --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/addons/AddonPrisex24Behaviour.java @@ -0,0 +1,59 @@ +package com.hazard157.prisex24.e4.addons; + +import org.eclipse.e4.core.contexts.*; +import org.toxsoft.core.tsgui.mws.bases.*; +import org.toxsoft.core.tslib.coll.primtypes.*; + +import com.hazard157.lib.core.utils.animkind.*; +import com.hazard157.prisex24.e4.services.currep.*; +import com.hazard157.prisex24.e4.services.selsvins.*; +import com.hazard157.prisex24.glib.frasel.*; +import com.hazard157.psx.common.stuff.svin.*; +import com.hazard157.psx.proj3.episodes.*; + +/** + * Sets up application common behaviour. + * + * @author hazard157 + */ +public class AddonPrisex24Behaviour + extends MwsAbstractAddon { + + /** + * Constructor. + */ + public AddonPrisex24Behaviour() { + super( AddonPrisex24Behaviour.class.getSimpleName() ); + } + + // ------------------------------------------------------------------------------------ + // implementation + // + + // ------------------------------------------------------------------------------------ + // MwsAbstractAddon + // + + @Override + protected void initApp( IEclipseContext aAppContext ) { + // nop + } + + @Override + protected void initWin( IEclipseContext aWinContext ) { + // on current episode change displays it's animated frames in the shared view + ICurrentEpisodeService currEpService = aWinContext.get( ICurrentEpisodeService.class ); + IPsxSelectedSvinsService selSvinsService = aWinContext.get( IPsxSelectedSvinsService.class ); + currEpService.addCurrentEntityChangeListener( aCurrent -> { + IEpisode currEpisode = currEpService.current(); + Svin svin = null; + if( currEpisode != null ) { + svin = new Svin( currEpisode.id() ); + } + selSvinsService.framesSelectionParams().setParams( EAnimationKind.ANIMATED, Boolean.FALSE, IStringList.EMPTY, + EFramesPerSvin.SELECTED ); + selSvinsService.setSvin( svin ); + } ); + } + +} diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/addons/AddonPrisex24Core.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/addons/AddonPrisex24Core.java index a8842e6..bdceb68 100644 --- a/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/addons/AddonPrisex24Core.java +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/addons/AddonPrisex24Core.java @@ -27,6 +27,7 @@ import com.hazard157.prisex24.cofs.impl.*; import com.hazard157.prisex24.e4.services.currep.*; import com.hazard157.prisex24.e4.services.psx.*; +import com.hazard157.prisex24.e4.services.selsvins.*; import com.hazard157.prisex24.m5.episodes.*; import com.hazard157.prisex24.m5.frames.*; import com.hazard157.prisex24.m5.tags.*; @@ -35,7 +36,7 @@ import com.hazard157.psx.proj3.*; /** - * Plugin addon. + * Plugin addon - initializes all subsystems and modules.. * * @author hazard157 */ @@ -72,6 +73,7 @@ protected void initApp( IEclipseContext aAppContext ) { aAppContext.set( IPsxCofs.class, new PsxCofs() ); // E4 services aAppContext.set( ICurrentEpisodeService.class, new CurrentEpisodeService( aAppContext ) ); + aAppContext.set( IPsxSelectedSvinsService.class, new PsxSelectedSvinsService() ); } @Override diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/services/selsvins/IPsxSelectedSvinsService.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/services/selsvins/IPsxSelectedSvinsService.java new file mode 100644 index 0000000..902b8e2 --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/services/selsvins/IPsxSelectedSvinsService.java @@ -0,0 +1,66 @@ +package com.hazard157.prisex24.e4.services.selsvins; + +import org.toxsoft.core.tslib.bricks.events.change.*; +import org.toxsoft.core.tslib.coll.*; +import org.toxsoft.core.tslib.coll.impl.*; +import org.toxsoft.core.tslib.utils.errors.*; + +import com.hazard157.prisex24.glib.frasel.*; +import com.hazard157.psx.common.stuff.svin.*; + +/** + * Service introduces concept of "selected SVINSs to be viewed as frames". + * + * @author hazard157 + */ +public interface IPsxSelectedSvinsService { + + /** + * Returns list of SVINs. + * + * @return {@link IList}<{@link Svin}> - list of SVINs + */ + IList svins(); + + /** + * Sets list of SVINs. + * + * @param aSvins {@link IList}<{@link Svin}> - list of SVINs + * @throws TsNullArgumentRtException any argument = null + */ + void setSvins( IList aSvins ); + + /** + * Returns the means to tune how the specified {@link #svins()} will be displayed as frames. + *

    + * Note: user may override this settings at any time in by the frames viewer GUI. + * + * @return {@link ISvinFramesParams} - the SVINs to frames strategy + */ + ISvinFramesParams framesSelectionParams(); + + /** + * Returns event manager informing of changes in {@link #svins()} list. + *

    + * Note: {@link #framesSelectionParams()} has own eventer, so does not affects this one. + * + * @return {@link IGenericChangeEventer} - SVINs list change eventer + */ + IGenericChangeEventer eventer(); + + // ------------------------------------------------------------------------------------ + // Convenience inline methods + + /** + * Set single SVIN. + * + * @param aSvin {@link Svin} - the SVIN, may be null + */ + default void setSvin( Svin aSvin ) { + if( aSvin != null ) { + setSvins( new SingleItemList<>( aSvin ) ); + return; + } + setSvins( IList.EMPTY ); + } +} diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/services/selsvins/PsxSelectedSvinsService.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/services/selsvins/PsxSelectedSvinsService.java new file mode 100644 index 0000000..f548408 --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/services/selsvins/PsxSelectedSvinsService.java @@ -0,0 +1,59 @@ +package com.hazard157.prisex24.e4.services.selsvins; + +import org.toxsoft.core.tslib.bricks.events.change.*; +import org.toxsoft.core.tslib.coll.*; +import org.toxsoft.core.tslib.coll.impl.*; +import org.toxsoft.core.tslib.utils.errors.*; + +import com.hazard157.prisex24.glib.frasel.*; +import com.hazard157.psx.common.stuff.svin.*; + +/** + * {@link IPsxSelectedSvinsService} implementation. + * + * @author hazard157 + */ +public class PsxSelectedSvinsService + implements IPsxSelectedSvinsService { + + private final GenericChangeEventer eventer; + private final IListEdit svins = new ElemArrayList<>(); + private final ISvinFramesParams framesSelectionParams = new SvinFramesParams(); + + /** + * Constructor. + */ + public PsxSelectedSvinsService() { + eventer = new GenericChangeEventer( this ); + } + + // ------------------------------------------------------------------------------------ + // IPsxSelectedSvinsService + // + + @Override + public IList svins() { + return svins; + } + + @Override + public void setSvins( IList aSvins ) { + TsNullArgumentRtException.checkNull( aSvins ); + if( svins.equals( aSvins ) ) { + return; + } + svins.setAll( aSvins ); + eventer.fireChangeEvent(); + } + + @Override + public ISvinFramesParams framesSelectionParams() { + return framesSelectionParams; + } + + @Override + public IGenericChangeEventer eventer() { + return eventer; + } + +} diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/uiparts/UipartSharedSvinsFramesViewer.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/uiparts/UipartSharedSvinsFramesViewer.java new file mode 100644 index 0000000..2421a98 --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/uiparts/UipartSharedSvinsFramesViewer.java @@ -0,0 +1,39 @@ +package com.hazard157.prisex24.e4.uiparts; + +import javax.inject.*; + +import org.eclipse.swt.widgets.*; + +import com.hazard157.prisex24.e4.services.selsvins.*; +import com.hazard157.prisex24.glib.frview.*; +import com.hazard157.prisex24.glib.frview.impl.*; + +/** + * Shared UIpart: displays frames of {@link IPsxSelectedSvinsService#svins()}. + *

    + * When {@link IPsxSelectedSvinsService#eventer()} or {@link IPsxSelectedSvinsService#framesSelectionParams()} eventers + * fire the change event refreshes the view. + * + * @author hazard157 + */ +public class UipartSharedSvinsFramesViewer + extends PsxAbstractUipart { + + @Inject + IPsxSelectedSvinsService selectedSvinsService; + + private ISvinsFramesViewer svinViewer; + + @Override + protected void doInit( Composite aParent ) { + svinViewer = new SvinsFramesViewer( aParent, tsContext() ); + selectedSvinsService.eventer().addListener( s -> refreshView() ); + selectedSvinsService.framesSelectionParams().genericChangeEventer().addListener( s -> refreshView() ); + } + + private void refreshView() { + svinViewer.svinFramesParams().setParams( selectedSvinsService.framesSelectionParams() ); + svinViewer.svinSeq().svins().setAll( selectedSvinsService.svins() ); + } + +} diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/DialogWorkWithFrames.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/DialogWorkWithFrames.java new file mode 100644 index 0000000..da2b229 --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/DialogWorkWithFrames.java @@ -0,0 +1,76 @@ +package com.hazard157.prisex24.glib.dialogs; + +import static com.hazard157.prisex24.glib.dialogs.IPsxResources.*; +import static org.toxsoft.core.tsgui.dialogs.datarec.ITsDialogConstants.*; + +import org.eclipse.e4.core.contexts.*; +import org.eclipse.swt.widgets.*; +import org.toxsoft.core.tsgui.bricks.ctx.*; +import org.toxsoft.core.tsgui.dialogs.datarec.*; +import org.toxsoft.core.tsgui.utils.layout.*; +import org.toxsoft.core.tslib.utils.errors.*; + +import com.hazard157.prisex24.glib.epframes.*; +import com.hazard157.psx.common.stuff.frame.*; +import com.hazard157.psx.proj3.episodes.*; + +/** + * Dialog to show and work with frames around the specified frame. + * + * @author hazard157 + */ +public class DialogWorkWithFrames + extends AbstractTsDialogPanel { + + static final String SETTINGS_NODE_ID = "DialogWorkWithFrames.FramesListViewer"; //$NON-NLS-1$ + + final IEpisodeFramesViewer framesViewer; + + DialogWorkWithFrames( Composite aParent, TsDialog aOwnerDialog, String aEpisodeId ) { + super( aParent, aOwnerDialog ); + this.setLayout( new BorderLayout() ); + framesViewer = new EpisodeFramesViewer( tsContext() ); + framesViewer.createControl( aParent ).setLayoutData( BorderLayout.CENTER ); + framesViewer.setEpisodeId( aEpisodeId ); + } + + @Override + protected void doSetDataRecord( IFrame aData ) { + framesViewer.setSelectedItem( aData ); + } + + @Override + protected IFrame doGetDataRecord() { + return framesViewer.selectedItem(); + } + + // ------------------------------------------------------------------------------------ + // API + // + + /** + * Displays a dialog for working with frames nearby the specified frame. + * + * @param aContext {@link ITsGuiContext} - the context + * @param aInitialFrame {@link IFrame} - the initial frame + * @throws TsNullArgumentRtException any argument = null + * @throws TsIllegalArgumentRtException the frame is undefined + * @throws TsItemNotFoundRtException the episode of the frame does not exists + */ + public static void open( ITsGuiContext aContext, IFrame aInitialFrame ) { + // check preconditions + TsNullArgumentRtException.checkNulls( aContext, aInitialFrame ); + TsIllegalArgumentRtException.checkFalse( aInitialFrame.isDefined() ); + IUnitEpisodes ue = aContext.get( IUnitEpisodes.class ); + TsItemNotFoundRtException.checkFalse( ue.items().hasKey( aInitialFrame.episodeId() ) ); + // invoke dialog + Shell shell = aContext.get( Shell.class ); + IDialogPanelCreator creator = + ( aParent, aOwnerDialog ) -> new DialogWorkWithFrames( aParent, aOwnerDialog, aInitialFrame.episodeId() ); + TsDialogInfo cdi = new TsDialogInfo( aContext, shell, DLG_DWWF, DLG_DWWF_D, DF_NO_APPROVE | DF_NONMODAL ); + cdi.setMinSizeShellRelative( 65, 80 ); + TsDialog d = new TsDialog<>( cdi, aInitialFrame, aContext.eclipseContext(), creator ); + d.execDialog(); + } + +} diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/IPsxResources.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/IPsxResources.java new file mode 100644 index 0000000..e4536b5 --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/IPsxResources.java @@ -0,0 +1,18 @@ +package com.hazard157.prisex24.glib.dialogs; + +import com.hazard157.prisex24.utils.Messages; + +/** + * Localizable resources. + * + * @author hazard157 + */ +interface IPsxResources { + + /** + * {@link DialogWorkWithFrames} + */ + String DLG_DWWF = Messages.getString( "DLG_DWWF" ); //$NON-NLS-1$ + String DLG_DWWF_D = Messages.getString( "DLG_DWWF_D" ); //$NON-NLS-1$ + +} diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/Messages.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/Messages.java new file mode 100644 index 0000000..e412427 --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/Messages.java @@ -0,0 +1,24 @@ +package com.hazard157.prisex24.glib.dialogs; + +import java.util.*; + +@SuppressWarnings( "javadoc" ) +public class Messages { + + private static final String BUNDLE_NAME = Messages.class.getName().toLowerCase(); + + private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME ); + + private Messages() { + } + + public static String getString( String aKey ) { + try { + return RESOURCE_BUNDLE.getString( aKey ); + } + catch( @SuppressWarnings( "unused" ) MissingResourceException e ) { + return '!' + aKey + '!'; + } + } + +} diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/messages.properties b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/messages.properties new file mode 100644 index 0000000..9feac1e --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/messages.properties @@ -0,0 +1,2 @@ +DLG_DWWF = Frames +DLG_DWWF_D = Viewing and working with files and images of episode frames diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/messages_ka_GE.properties b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/messages_ka_GE.properties new file mode 100644 index 0000000..5460bd1 --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/messages_ka_GE.properties @@ -0,0 +1,2 @@ +DLG_DWWF = კადრები +DLG_DWWF_D = ეპიზოდების კადრების ფაილებთან და სურათებთან დათვალიერება და მუშაობა diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/messages_ru_RU.properties b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/messages_ru_RU.properties new file mode 100644 index 0000000..24d0212 --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/dialogs/messages_ru_RU.properties @@ -0,0 +1,2 @@ +DLG_DWWF = Кадры +DLG_DWWF_D = Просмотр и работа с файлами и изображениями кадров эпизодов diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/frep/EpisodeFramesViewer.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/epframes/EpisodeFramesViewer.java similarity index 98% rename from com.hazard157.prisex24/src/com/hazard157/prisex24/glib/frep/EpisodeFramesViewer.java rename to com.hazard157.prisex24/src/com/hazard157/prisex24/glib/epframes/EpisodeFramesViewer.java index b549b7a..0d486b4 100644 --- a/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/frep/EpisodeFramesViewer.java +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/epframes/EpisodeFramesViewer.java @@ -1,4 +1,4 @@ -package com.hazard157.prisex24.glib.frep; +package com.hazard157.prisex24.glib.epframes; import static com.hazard157.prisex24.m5.IPsxM5Constants.*; diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/frep/IEpisodeFramesViewer.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/epframes/IEpisodeFramesViewer.java similarity index 96% rename from com.hazard157.prisex24/src/com/hazard157/prisex24/glib/frep/IEpisodeFramesViewer.java rename to com.hazard157.prisex24/src/com/hazard157/prisex24/glib/epframes/IEpisodeFramesViewer.java index e875085..5223794 100644 --- a/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/frep/IEpisodeFramesViewer.java +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/epframes/IEpisodeFramesViewer.java @@ -1,4 +1,4 @@ -package com.hazard157.prisex24.glib.frep; +package com.hazard157.prisex24.glib.epframes; import org.eclipse.swt.widgets.*; import org.toxsoft.core.tsgui.bricks.stdevents.*; diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/frep/IPsxResources.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/epframes/IPsxResources.java similarity index 98% rename from com.hazard157.prisex24/src/com/hazard157/prisex24/glib/frep/IPsxResources.java rename to com.hazard157.prisex24/src/com/hazard157/prisex24/glib/epframes/IPsxResources.java index 2bd2b75..ac2b798 100644 --- a/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/frep/IPsxResources.java +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/epframes/IPsxResources.java @@ -1,4 +1,4 @@ -package com.hazard157.prisex24.glib.frep; +package com.hazard157.prisex24.glib.epframes; /** * Локализуемые ресурсы. diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/frasel/ISvinFramesSelectionStrategy.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/frasel/ISvinFramesParams.java similarity index 77% rename from com.hazard157.prisex24/src/com/hazard157/prisex24/glib/frasel/ISvinFramesSelectionStrategy.java rename to com.hazard157.prisex24/src/com/hazard157/prisex24/glib/frasel/ISvinFramesParams.java index f6b332f..925dda1 100644 --- a/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/frasel/ISvinFramesSelectionStrategy.java +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/glib/frasel/ISvinFramesParams.java @@ -1,16 +1,14 @@ package com.hazard157.prisex24.glib.frasel; import org.toxsoft.core.tslib.bricks.events.change.*; -import org.toxsoft.core.tslib.coll.*; import org.toxsoft.core.tslib.coll.primtypes.*; import org.toxsoft.core.tslib.utils.errors.*; import com.hazard157.lib.core.utils.animkind.*; -import com.hazard157.psx.common.stuff.frame.*; import com.hazard157.psx.common.stuff.svin.*; /** - * Determines rules how to make list of frames from the SVIN. + * Determines parameters of the algorithm making list of frames from the SVIN. *

    * Selection is mare by rules: *

      @@ -31,7 +29,7 @@ * * @author hazard157 */ -public interface ISvinFramesSelectionStrategy +public interface ISvinFramesParams extends IGenericChangeEventCapable { /** @@ -95,6 +93,27 @@ public interface ISvinFramesSelectionStrategy */ void setFramesPerSvin( EFramesPerSvin aFramesPerSvin ); + /** + * Sets all parameters at once. + *

      + * Note: any argument may have value null indication that corresponding parameters would not be changed. + * + * @param aAnimationKind {@link EAnimationKind} - accepted images kind or null + * @param aOnlySvinCams {@link Boolean} - true only SVIN camera frames, or null + * @param aCameraIds {@link IStringList} - the camera IDs or an empty list for any camera or null + * @param aFramesPerSvin {@link EFramesPerSvin} - frames per SVIN or null + */ + void setParams( EAnimationKind aAnimationKind, Boolean aOnlySvinCams, IStringList aCameraIds, + EFramesPerSvin aFramesPerSvin ); + + /** + * Sets all parameters at once from the source parameres holde.. + * + * @param aSource {@link ISvinFramesParams} - the source + * @throws TsNullArgumentRtException any argument = null + */ + void setParams( ISvinFramesParams aSource ); + /** * Selects and returns frames for the specified SVIN. *

      @@ -104,6 +123,5 @@ public interface ISvinFramesSelectionStrategy * @return {@link IList}<{@link IFrame}> - selected frames * @throws TsNullArgumentRtException any argument = null */ - IList