import { PSControlImpl } from '../pscontrol-impl'; import { IPSCaptionBar } from './ipscaption-bar'; import { IPSLanguageRes } from '../../res/ipslanguage-res'; import { IPSSysImage } from '../../res/ipssys-image'; export class PSCaptionBarImpl extends PSControlImpl implements IPSCaptionBar { 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; } 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 subcappslanguageres: IPSLanguageRes | null = null; getSubCapPSLanguageRes(): IPSLanguageRes | null { if (this.subcappslanguageres != null) return this.subcappslanguageres; const value = this.M.getSubCapPSLanguageRes; if (value == null) { return null; } this.subcappslanguageres = this.getPSModel4('res.IPSLanguageRes', value, 'getSubCapPSLanguageRes') as IPSLanguageRes; return this.subcappslanguageres; } get subCapPSLanguageRes(): IPSLanguageRes | null { return this.getSubCapPSLanguageRes(); } getSubCapPSLanguageResMust(): IPSLanguageRes { const value = this.getSubCapPSLanguageRes(); if (value == null) { throw new Error('未指定子标题语言资源'); } return value; } get subCaption(): string { return this.M.subCaption; } get cls(): string { return 'PSCaptionBarImpl'; } instanceof(cls: string): boolean { if (cls == 'control.captionbar.IPSCaptionBar') return true; return super.instanceof(cls); } }