import { IPSDEContextMenuItem } from './ipsdecontext-menu-item'; import { IPSDEToolbarItem } from './ipsdetoolbar-item'; import { IPSLanguageRes } from '../../res/ipslanguage-res'; import { IPSSysCss } from '../../res/ipssys-css'; import { IPSSysImage } from '../../res/ipssys-image'; import { IPSSysPFPlugin } from '../../res/ipssys-pfplugin'; import { PSModelObjectImpl } from '../../psmodel-object-impl'; export class PSDEToolbarItemImpl extends PSModelObjectImpl implements IPSDEToolbarItem, IPSDEContextMenuItem { protected cappslanguageres: IPSLanguageRes | null = null; getCapPSLanguageRes(): IPSLanguageRes | null { if (this.cappslanguageres != null) return this.cappslanguageres; const value = this.M.getCapPSLanguageRes; if (value == null) { return null; } this.cappslanguageres = this.getPSModel4('res.IPSLanguageRes', value, 'getCapPSLanguageRes') as IPSLanguageRes; return this.cappslanguageres; } get capPSLanguageRes(): IPSLanguageRes | null { return this.getCapPSLanguageRes(); } getCapPSLanguageResMust(): IPSLanguageRes { const value = this.getCapPSLanguageRes(); if (value == null) { throw new Error('未指定标题语言资源'); } return value; } get caption(): string { return this.M.caption; } get codeName(): string { return this.M.codeName; } get data(): string { return this.M.data; } get dynaClass(): string { return this.M.dynaClass; } get dynaModelFilePath(): string { return this.M.dynaModelFilePath; } get height(): number { return this.M.height != null ? this.M.height : 0.0; } get itemType(): 'DEUIACTION' | 'SEPERATOR' | 'ITEMS' | 'RAWITEM' { return this.M.itemType; } get mOSFilePath(): string { return this.M.mOSFilePath; } get memo(): string { return this.M.memo; } get name(): string { return this.M.name; } protected pssyscss: IPSSysCss | null = null; getPSSysCss(): IPSSysCss | null { if (this.pssyscss != null) return this.pssyscss; const value = this.M.getPSSysCss; if (value == null) { return null; } this.pssyscss = this.getPSModel4('res.IPSSysCss', value, 'getPSSysCss') as IPSSysCss; return this.pssyscss; } get psSysCss(): IPSSysCss | null { return this.getPSSysCss(); } getPSSysCssMust(): IPSSysCss { const value = this.getPSSysCss(); if (value == null) { throw new Error('未指定系统样式表'); } return value; } protected pssysimage: IPSSysImage | null = null; getPSSysImage(): IPSSysImage | null { if (this.pssysimage != null) return this.pssysimage; const value = this.M.getPSSysImage; if (value == null) { return null; } this.pssysimage = this.getPSModel4('res.IPSSysImage', value, 'getPSSysImage') as IPSSysImage; return this.pssysimage; } get psSysImage(): IPSSysImage | null { return this.getPSSysImage(); } getPSSysImageMust(): IPSSysImage { const value = this.getPSSysImage(); if (value == null) { throw new Error('未指定图标资源对象'); } return value; } protected pssyspfplugin: IPSSysPFPlugin | null = null; getPSSysPFPlugin(): IPSSysPFPlugin | null { if (this.pssyspfplugin != null) return this.pssyspfplugin; const value = this.M.getPSSysPFPlugin; if (value == null) { return null; } this.pssyspfplugin = this.getPSModel4('res.IPSSysPFPlugin', value, 'getPSSysPFPlugin') as IPSSysPFPlugin; return this.pssyspfplugin; } get psSysPFPlugin(): IPSSysPFPlugin | null { return this.getPSSysPFPlugin(); } getPSSysPFPluginMust(): IPSSysPFPlugin { const value = this.getPSSysPFPlugin(); if (value == null) { throw new Error('未指定前端应用插件'); } return value; } get rTMOSFilePath(): string { return this.M.rTMOSFilePath; } get tooltip(): string { return this.M.tooltip; } protected tooltippslanguageres: IPSLanguageRes | null = null; getTooltipPSLanguageRes(): IPSLanguageRes | null { if (this.tooltippslanguageres != null) return this.tooltippslanguageres; const value = this.M.getTooltipPSLanguageRes; if (value == null) { return null; } this.tooltippslanguageres = this.getPSModel4('res.IPSLanguageRes', value, 'getTooltipPSLanguageRes') as IPSLanguageRes; return this.tooltippslanguageres; } get tooltipPSLanguageRes(): IPSLanguageRes | null { return this.getTooltipPSLanguageRes(); } getTooltipPSLanguageResMust(): IPSLanguageRes { const value = this.getTooltipPSLanguageRes(); if (value == null) { throw new Error('未指定提示语言资源'); } return value; } get userCat(): string { return this.M.userCat; } get userTag(): string { return this.M.userTag; } get userTag2(): string { return this.M.userTag2; } get userTag3(): string { return this.M.userTag3; } get userTag4(): string { return this.M.userTag4; } get width(): number { return this.M.width != null ? this.M.width : 0.0; } get showCaption(): boolean { return this.M.showCaption; } get showIcon(): boolean { return this.M.showIcon; } get valid(): boolean { return this.M.valid != null ? this.M.valid : true; } get cls(): string { return 'PSDEToolbarItemImpl'; } instanceof(cls: string): boolean { if (cls == 'control.toolbar.IPSDEContextMenuItem' || cls == 'control.toolbar.IPSDEToolbarItem') return true; return super.instanceof(cls); } }