From: <jfu...@us...> - 2009-01-10 23:27:23
|
Revision: 12142 http://jvcl.svn.sourceforge.net/jvcl/?rev=12142&view=rev Author: jfudickar Date: 2009-01-10 23:27:19 +0000 (Sat, 10 Jan 2009) Log Message: ----------- New Interface IJvDynControlCaption - Changed all DynControlEngines Modified Paths: -------------- trunk/jvcl/run/JvBaseDBThreadedDataset.pas trunk/jvcl/run/JvDynControlEngineDB.pas trunk/jvcl/run/JvDynControlEngineVCL.pas trunk/jvcl/run/JvPropertyStoreEditor.pas Modified: trunk/jvcl/run/JvBaseDBThreadedDataset.pas =================================================================== --- trunk/jvcl/run/JvBaseDBThreadedDataset.pas 2009-01-10 23:19:12 UTC (rev 12141) +++ trunk/jvcl/run/JvBaseDBThreadedDataset.pas 2009-01-10 23:27:19 UTC (rev 12142) @@ -496,7 +496,7 @@ var MainPanel: TWinControl; ITmpPanel: IJvDynControlPanel; - ITmpControl: IJvDynControl; + ITmpControl: IJvDynControlCaption; begin MainPanel := DynControlEngine.CreatePanelControl(Self, Self, 'MainPanel', '', alClient); if not Supports(MainPanel, IJvDynControlPanel, ITmpPanel) then @@ -504,10 +504,10 @@ ITmpPanel.ControlSetBorder(bvNone, bvNone, 0, bsNone, 5); CreateTextPanel(Self, MainPanel, FTimePanel, FTimeLabel, FTimeStaticText, 'Time'); - if Supports(FTimeLabel, IJvDynControl, ITmpControl) then + if Supports(FTimeLabel, IJvDynControlCaption, ITmpControl) then ITmpControl.ControlSetCaption(RsODSOpenFetch); CreateTextPanel(Self, MainPanel, FRowsPanel, FRowsLabel, FRowsStaticText, 'Rows'); - if Supports(FRowsLabel, IJvDynControl, ITmpControl) then + if Supports(FRowsLabel, IJvDynControlCaption, ITmpControl) then ITmpControl.ControlSetCaption(RsODSCurrentRecord); FCancelButtonPanel := DynControlEngine.CreatePanelControl(Self, MainPanel, 'ButtonPanel', '', alTop); FCancelBtn := DynControlEngine.CreateButton(Self, FCancelButtonPanel, @@ -561,7 +561,7 @@ procedure TJvDatasetThreadDialogForm.FillDialogData; var - ITmpControl: IJvDynControl; + ITmpControl: IJvDynControlCaption; begin if Assigned(ConnectedDatasetHandler) then begin @@ -569,9 +569,9 @@ Caption := DialogOptions.Caption +' - '+ConnectedDatasetHandler.CurrentOperationAction else Caption := ConnectedDatasetHandler.CurrentOperationAction ; - if Supports(FRowsStaticText, IJvDynControl, ITmpControl) then + if Supports(FRowsStaticText, IJvDynControlCaption, ITmpControl) then ITmpControl.ControlSetCaption(IntToStr(ConnectedDatasetHandler.CurrentRow)); - if Supports(FTimeStaticText, IJvDynControl, ITmpControl) then + if Supports(FTimeStaticText, IJvDynControlCaption, ITmpControl) then ITmpControl.ControlSetCaption( FormatDateTime('hh:nn:ss', ConnectedDatasetHandler.CurrentOpenDuration) + ' / ' + FormatDateTime('hh:nn:ss', ConnectedDatasetHandler.CurrentFetchDuration)); Modified: trunk/jvcl/run/JvDynControlEngineDB.pas =================================================================== --- trunk/jvcl/run/JvDynControlEngineDB.pas 2009-01-10 23:19:12 UTC (rev 12141) +++ trunk/jvcl/run/JvDynControlEngineDB.pas 2009-01-10 23:27:19 UTC (rev 12142) @@ -331,11 +331,11 @@ AParentControl: TWinControl; const AControlName: string; ADataSource: TDataSource; const ADataField: string; const ACaption: string): TWinControl; var - DynCtrl: IJvDynControl; + DynCtrl: IJvDynControlCaption; begin Result := TWinControl(CreateDBControl(jctDBText, AOwner, AParentControl, AControlName, ADataSource, ADataField)); - if not Supports(Result, IJvDynControl, DynCtrl) then + if not Supports(Result, IJvDynControlCaption, DynCtrl) then raise EIntfCastError.CreateRes(@RsEIntfCastError); DynCtrl.ControlSetCaption(ACaption); end; @@ -354,11 +354,11 @@ function TJvDynControlEngineDB.CreateDBCheckboxControl(AOwner: TComponent; AParentControl: TWinControl; const AControlName: string; ADataSource: TDataSource; const ADataField, ACaption: string): TWinControl; var - DynCtrl: IJvDynControl; + DynCtrl: IJvDynControlCaption; begin Result := TWinControl(CreateDBControl(jctDBCheckBox, AOwner, AParentControl, AControlName, ADataSource, ADataField)); - if not Supports(Result, IJvDynControl, DynCtrl) then + if not Supports(Result, IJvDynControlCaption, DynCtrl) then raise EIntfCastError.CreateRes(@RsEIntfCastError); DynCtrl.ControlSetCaption(ACaption); end; @@ -387,12 +387,12 @@ AParentControl: TWinControl; const AControlName: string; ADataSource: TDataSource; const ADataField, ACaption: string; AItems: TStrings): TWinControl; var - DynCtrl: IJvDynControl; + DynCtrl: IJvDynControlCaption; DynCtrlItems: IJvDynControlItems; begin Result := TWinControl(CreateDBControl(jctDBRadioGroup, AOwner, AParentControl, AControlName, ADataSource, ADataField)); - if not Supports(Result, IJvDynControl, DynCtrl) then + if not Supports(Result, IJvDynControlCaption, DynCtrl) then raise EIntfCastError.CreateRes(@RsEIntfCastError); DynCtrl.ControlSetCaption(ACaption); if not Supports(Result, IJvDynControlItems, DynCtrlItems) then Modified: trunk/jvcl/run/JvDynControlEngineVCL.pas =================================================================== --- trunk/jvcl/run/JvDynControlEngineVCL.pas 2009-01-10 23:19:12 UTC (rev 12141) +++ trunk/jvcl/run/JvDynControlEngineVCL.pas 2009-01-10 23:27:19 UTC (rev 12142) @@ -473,7 +473,6 @@ IJvDynControl, IJvDynControlCaption, IJvDynControlPanel, IJvDynControlAlign, IJvDynControlAutoSize, IJvDynControlBevelBorder, IJvDynControlColor, IJvDynControlAlignment) - strict private public function ControlGetCaption: string; procedure ControlSetDefaultProperties; Modified: trunk/jvcl/run/JvPropertyStoreEditor.pas =================================================================== --- trunk/jvcl/run/JvPropertyStoreEditor.pas 2009-01-10 23:19:12 UTC (rev 12141) +++ trunk/jvcl/run/JvPropertyStoreEditor.pas 2009-01-10 23:27:19 UTC (rev 12142) @@ -63,7 +63,7 @@ FInspectedObjectEditorHandlerIntf: IJvPropertyEditorHandler; FInspectedObjectListEditorHandlerIntf: IJvPropertyListEditorHandler; FPropertyStore: TComponent; - InfoGroupBoxDynControlIntf: IJvDynControl; + InfoGroupBoxDynControlCaptionIntf: IJvDynControlCaption; InfoMemoDynControlDataIntf: IJvDynControlData; InfoMemo: TWinControl; InfoPanel: TWinControl; @@ -295,7 +295,7 @@ InfoPanel.Height := 100; InfoGroupBox := DefaultDynControlEngine.CreateGroupBoxControl(Self, InfoPanel, 'InfoGroupBox', 'Info'); InfoGroupBox.Align := alClient; - Supports(InfoGroupBox, IJvDynControl, InfoGroupBoxDynControlIntf); + Supports(InfoGroupBox, IJvDynControlCaption, InfoGroupBoxDynControlCaptionIntf); InfoMemoPanel := DefaultDynControlEngine.CreatePanelControl(Self, InfoGroupBox, 'InfoMemoPanel', '', alClient); if InfoMemoPanel is TCustomPanel then begin @@ -374,7 +374,7 @@ InspectedObject := nil; FInspectedObjectEditorHandlerIntf := nil; FInspectedObjectListEditorHandlerIntf := nil; - InfoGroupBoxDynControlIntf := nil; + InfoGroupBoxDynControlCaptionIntf := nil; InfoMemoDynControlDataIntf := nil; ListBoxControlItemsIntf := nil; ListBoxControlItemIndexIntf := nil; @@ -803,7 +803,7 @@ if csDestroying in Componentstate then Exit; InfoMemoDynControlDataIntf.ControlValue := iInfo; - InfoGroupBoxDynControlIntf.ControlSetCaption(iCaption); + InfoGroupBoxDynControlCaptionIntf.ControlSetCaption(iCaption); InfoPanel.Visible := iInfo <> ''; end; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |