import { IPSImageItem } from './ipsimage-item'; import { PSRawItemImplBase } from './psraw-item-impl-base'; import { IPSSysImage } from '../../res/ipssys-image'; export class PSImageItemImpl extends PSRawItemImplBase implements IPSImageItem { get alternativeText(): string { return this.M.alternativeText; } get fitMode(): string { return this.M.fitMode; } 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; } get placeCenter(): boolean { return this.M.placeCenter != null ? this.M.placeCenter : false; } get cls(): string { return 'PSImageItemImpl'; } instanceof(cls: string): boolean { if (cls == 'control.IPSImageBase' || cls == 'control.rawitem.IPSImageItem') return true; return super.instanceof(cls); } }