-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working on Prisex24.2, backporint from Psx31
- Loading branch information
goga
authored and
goga
committed
Jun 14, 2023
1 parent
1e14859
commit fd560ca
Showing
156 changed files
with
1,784 additions
and
450 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
com.hazard157.prisex24/src/com/hazard157/prisex24/IPsxGuiContextable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.hazard157.prisex24; | ||
|
||
import org.toxsoft.core.tsgui.bricks.ctx.*; | ||
|
||
import com.hazard157.common.e4.services.mps.*; | ||
import com.hazard157.psx.proj3.episodes.*; | ||
|
||
/** | ||
* Extending {@link ITsGuiContextable} with PSX services. | ||
* | ||
* @author hazard157 | ||
*/ | ||
@SuppressWarnings( "javadoc" ) | ||
public interface IPsxGuiContextable | ||
extends ITsGuiContextable { | ||
|
||
default IUnitEpisodes unitEpisodes() { | ||
return tsContext().get( IUnitEpisodes.class ); | ||
} | ||
|
||
default IMediaPlayerService mediaPlayer() { | ||
return tsContext().get( IMediaPlayerService.class ); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...zard157.prisex24/src/com/hazard157/prisex24/e4/services/currep/CurrentEpisodeService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.hazard157.prisex24.e4.services.currep; | ||
|
||
import org.eclipse.e4.core.contexts.*; | ||
import org.toxsoft.core.tsgui.mws.services.currentity.*; | ||
import org.toxsoft.core.tslib.coll.helpers.*; | ||
import org.toxsoft.core.tslib.utils.errors.*; | ||
|
||
import com.hazard157.psx.proj3.episodes.*; | ||
|
||
/** | ||
* {@link ICurrentEpisodeService} implementation. | ||
* | ||
* @author hazard157 | ||
*/ | ||
public class CurrentEpisodeService | ||
extends CurrentEntityService<IEpisode> | ||
implements ICurrentEpisodeService { | ||
|
||
private final IUnitEpisodes unitEpisodes; | ||
|
||
/** | ||
* Конструктор. | ||
* | ||
* @param aAppContext {@link IEclipseContext} - контекст приложения | ||
* @throws TsNullArgumentRtException аргумент = null | ||
*/ | ||
public CurrentEpisodeService( IEclipseContext aAppContext ) { | ||
super( aAppContext ); | ||
unitEpisodes = appContext().get( IUnitEpisodes.class ); | ||
} | ||
|
||
@Override | ||
public void select( ETsCollMove aDirection ) { | ||
TsNullArgumentRtException.checkNull( aDirection ); | ||
IEpisode toSel = aDirection.findElemAt( current(), unitEpisodes.items(), 5, true ); | ||
setCurrent( toSel ); | ||
} | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
...ard157.prisex24/src/com/hazard157/prisex24/e4/services/currep/ICurrentEpisodeService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.hazard157.prisex24.e4.services.currep; | ||
|
||
import org.toxsoft.core.tsgui.mws.services.currentity.*; | ||
import org.toxsoft.core.tslib.coll.helpers.*; | ||
import org.toxsoft.core.tslib.utils.errors.*; | ||
|
||
import com.hazard157.psx.proj3.episodes.*; | ||
|
||
/** | ||
* The concept of "current episode in the application". | ||
* | ||
* @author hazard157 | ||
*/ | ||
public interface ICurrentEpisodeService | ||
extends ICurrentEntityService<IEpisode> { | ||
|
||
/** | ||
* Selects episode in the given direction. | ||
* | ||
* @param aDirection {@link ETsCollMove} - the direction | ||
* @throws TsNullArgumentRtException any argument = <code>null</code> | ||
*/ | ||
void select( ETsCollMove aDirection ); | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
com.hazard157.prisex24/src/com/hazard157/prisex24/e4/uiparts/PsxAbstractUipart.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.hazard157.prisex24.e4.uiparts; | ||
|
||
import org.toxsoft.core.tsgui.mws.bases.*; | ||
|
||
import com.hazard157.prisex24.*; | ||
|
||
/** | ||
* Extends {@link MwsAbstractPart} with {@link IPsxGuiContextable}. | ||
* | ||
* @author hazard157 | ||
*/ | ||
public abstract class PsxAbstractUipart | ||
extends MwsAbstractPart | ||
implements IPsxGuiContextable { | ||
|
||
// nop | ||
|
||
} |
59 changes: 59 additions & 0 deletions
59
...hazard157.prisex24/src/com/hazard157/prisex24/e4/uiparts/episodes/UipartEpisodesList.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package com.hazard157.prisex24.e4.uiparts.episodes; | ||
|
||
import static com.hazard157.prisex24.m5.IPsxM5Constants.*; | ||
import static org.toxsoft.core.tsgui.m5.gui.mpc.IMultiPaneComponentConstants.*; | ||
import static org.toxsoft.core.tslib.av.impl.AvUtils.*; | ||
|
||
import javax.inject.*; | ||
|
||
import org.eclipse.swt.widgets.*; | ||
import org.toxsoft.core.tsgui.bricks.ctx.*; | ||
import org.toxsoft.core.tsgui.bricks.ctx.impl.*; | ||
import org.toxsoft.core.tsgui.graphics.icons.*; | ||
import org.toxsoft.core.tsgui.graphics.image.*; | ||
import org.toxsoft.core.tsgui.m5.*; | ||
import org.toxsoft.core.tsgui.m5.gui.panels.*; | ||
import org.toxsoft.core.tsgui.m5.model.*; | ||
import org.toxsoft.core.tsgui.utils.layout.*; | ||
|
||
import com.hazard157.prisex24.e4.services.currep.*; | ||
import com.hazard157.prisex24.e4.uiparts.*; | ||
import com.hazard157.psx.proj3.episodes.*; | ||
|
||
/** | ||
* UIpart: list of episodes with selection synchronized with {@link ICurrentEpisodeService#current()}. | ||
* | ||
* @author hazard157 | ||
*/ | ||
public class UipartEpisodesList | ||
extends PsxAbstractUipart { | ||
|
||
@Inject | ||
ICurrentEpisodeService currentEpisodeService; | ||
|
||
IM5Model<IEpisode> model; | ||
IM5CollectionPanel<IEpisode> panel; | ||
IUnitEpisodes unitEpisodes; | ||
|
||
@Override | ||
protected void doInit( Composite aParent ) { | ||
currentEpisodeService.addCurrentEntityChangeListener( c -> updateCurrentEpisode() ); | ||
model = m5().getModel( MID_EPISODE, IEpisode.class ); | ||
ITsGuiContext ctx = new TsGuiContext( tsContext() ); | ||
OPDEF_IS_FILTER_PANE.setValue( ctx.params(), AV_TRUE ); | ||
OPDEF_NODE_THUMB_SIZE.setValue( ctx.params(), avValobj( EThumbSize.SZ180 ) ); | ||
OPDEF_NODE_ICON_SIZE.setValue( ctx.params(), avValobj( EIconSize.IS_64X64 ) ); | ||
IM5LifecycleManager<IEpisode> lm = model.getLifecycleManager( null ); | ||
panel = model.panelCreator().createCollEditPanel( ctx, lm.itemsProvider(), lm ); | ||
aParent.setLayout( new BorderLayout() ); | ||
panel.createControl( aParent ); | ||
panel.getControl().setLayoutData( BorderLayout.CENTER ); | ||
panel.addTsSelectionListener( ( src, sel ) -> currentEpisodeService.setCurrent( sel ) ); | ||
updateCurrentEpisode(); | ||
} | ||
|
||
void updateCurrentEpisode() { | ||
panel.setSelectedItem( currentEpisodeService.current() ); | ||
} | ||
|
||
} |
37 changes: 37 additions & 0 deletions
37
com.hazard157.prisex24/src/com/hazard157/prisex24/e4/uiparts/refbooks/UipartRefbookTags.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.hazard157.prisex24.e4.uiparts.refbooks; | ||
|
||
import javax.inject.*; | ||
|
||
import org.eclipse.swt.widgets.*; | ||
import org.toxsoft.core.tsgui.bricks.ctx.*; | ||
import org.toxsoft.core.tsgui.bricks.ctx.impl.*; | ||
import org.toxsoft.core.tsgui.m5.*; | ||
import org.toxsoft.core.tsgui.m5.gui.panels.*; | ||
import org.toxsoft.core.tsgui.m5.model.*; | ||
|
||
import com.hazard157.prisex24.e4.uiparts.*; | ||
import com.hazard157.prisex24.m5.*; | ||
import com.hazard157.psx.proj3.tags.*; | ||
|
||
/** | ||
* UIpart: tags refbook editor. | ||
* | ||
* @author hazard157 | ||
*/ | ||
public class UipartRefbookTags | ||
extends PsxAbstractUipart { | ||
|
||
@Inject | ||
IRootTag rootTag; | ||
|
||
@Override | ||
protected void doInit( Composite aParent ) { | ||
IM5Model<ITag> model = m5().getModel( IPsxM5Constants.MID_TAG, ITag.class ); | ||
ITsGuiContext ctx = new TsGuiContext( tsContext() ); | ||
IM5LifecycleManager<ITag> lm = model.getLifecycleManager( rootTag ); | ||
// DETAILS_PANE_PLACEMENT.setValue( ctx.params(), EBorderLayoutPlacement.SOUTH ); | ||
IM5CollectionPanel<ITag> panel = model.panelCreator().createCollEditPanel( ctx, lm.itemsProvider(), lm ); | ||
panel.createControl( aParent ); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
com.hazard157.prisex24/src/com/hazard157/prisex24/m5/tags/IPsxResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.hazard157.prisex24.m5.tags; | ||
|
||
/** | ||
* Localizable resources. | ||
* | ||
* @author hazard157 | ||
*/ | ||
interface IPsxResource { | ||
|
||
/** | ||
* {@link TagLifecycleManager} | ||
*/ | ||
String MSG_ERR_TAG_INV_MASTER_OBJ = Messages.getString( "MSG_ERR_TAG_INV_MASTER_OBJ" ); //$NON-NLS-1$ | ||
String FMT_ERR_CANT_MAKE_CHILDED_NODE_LEAF = Messages.getString( "FMT_ERR_CANT_MAKE_CHILDED_NODE_LEAF" ); //$NON-NLS-1$ | ||
String FMT_ERR_TAG_NAME_ALREADY_EXISTS = Messages.getString( "FMT_ERR_TAG_NAME_ALREADY_EXISTS" ); //$NON-NLS-1$ | ||
String FMT_WARN_REMOVE_TAG_WITH_CHILDS = Messages.getString( "FMT_WARN_REMOVE_TAG_WITH_CHILDS" ); //$NON-NLS-1$ | ||
|
||
/** | ||
* {@link TagM5Model} | ||
*/ | ||
String STR_TAG = Messages.getString( "STR_TAG" ); //$NON-NLS-1$ | ||
String STR_TAG_D = Messages.getString( "STR_TAG_D" ); //$NON-NLS-1$ | ||
String STR_TAG_ID = Messages.getString( "STR_TAG_ID" ); //$NON-NLS-1$ | ||
String STR_TAG_ID_D = Messages.getString( "STR_TAG_ID_D" ); //$NON-NLS-1$ | ||
String STR_TAG_NAME = Messages.getString( "STR_TAG_NAME" ); //$NON-NLS-1$ | ||
String STR_TAG_NAME_D = Messages.getString( "STR_TAG_NAME_D" ); //$NON-NLS-1$ | ||
|
||
/** | ||
* {@link TagMpc} | ||
*/ | ||
String STR_TMI_BY_GROUP = Messages.getString( "STR_TMI_BY_GROUP" ); //$NON-NLS-1$ | ||
String STR_TMI_BY_GROUP_D = Messages.getString( "STR_TMI_BY_GROUP_D" ); //$NON-NLS-1$ | ||
String FMT_ERR_NO_CHILDS_IN_LEAF = Messages.getString( "FMT_ERR_NO_CHILDS_IN_LEAF" ); //$NON-NLS-1$ | ||
String DLG_FMT_NEW_CHILD_TAG_D = Messages.getString( "DLG_FMT_NEW_CHILD_TAG_D" ); //$NON-NLS-1$ | ||
String DLG_NEW_ROOT_TAG_D = Messages.getString( "DLG_NEW_ROOT_TAG_D" ); //$NON-NLS-1$ | ||
String DLG_NEW_TAG = Messages.getString( "DLG_NEW_TAG" ); //$NON-NLS-1$ | ||
|
||
} |
Oops, something went wrong.