classdef PanduanSistem < matlab.apps.AppBase

    % Properties that correspond to app components
    properties (Access = public)
        UIFigure  matlab.ui.Figure
        Kembali   matlab.ui.control.Button
        Label_22  matlab.ui.control.Label
        Label_21  matlab.ui.control.Label
        Label_20  matlab.ui.control.Label
        Label_19  matlab.ui.control.Label
        Label_18  matlab.ui.control.Label
        Label_17  matlab.ui.control.Label
        Label_16  matlab.ui.control.Label
        Label_15  matlab.ui.control.Label
        Label_14  matlab.ui.control.Label
        Label_13  matlab.ui.control.Label
        Label_12  matlab.ui.control.Label
        Label_11  matlab.ui.control.Label
        Label_10  matlab.ui.control.Label
        Label_9   matlab.ui.control.Label
        Label_8   matlab.ui.control.Label
        Label_7   matlab.ui.control.Label
        Label_6   matlab.ui.control.Label
        Label_5   matlab.ui.control.Label
        Label_4   matlab.ui.control.Label
        Label_3   matlab.ui.control.Label
        Label_2   matlab.ui.control.Label
        Panel     matlab.ui.container.Panel
        Label     matlab.ui.control.Label
        Image2    matlab.ui.control.Image
        Image     matlab.ui.control.Image
    end

    % Callbacks that handle component events
    methods (Access = private)

        % Button pushed function: Kembali
        function KembaliButtonPushed(app, event)
        % Fungsi untuk menutup aplikasi
        delete(app.UIFigure); % Hapus atau tutup figure utama aplikasi
        app = BerandaKlasifikasiBatik; % Mengalihkan ke panduan sistem (misalkan membuat instance baru)
        end
    end

    % Component initialization
    methods (Access = private)

        % Create UIFigure and components
        function createComponents(app)

            % Create UIFigure and hide until all components are created
            app.UIFigure = uifigure('Visible', 'off');
            app.UIFigure.Position = [100 100 640 480];
            app.UIFigure.Name = 'MATLAB App';

            % Create Image
            app.Image = uiimage(app.UIFigure);
            app.Image.ScaleMethod = 'fill';
            app.Image.Position = [1 1 640 480];
            app.Image.ImageSource = 'Background_Batik.jpg';

            % Create Image2
            app.Image2 = uiimage(app.UIFigure);
            app.Image2.Position = [103 -7 572 451];
            app.Image2.ImageSource = 'SS Contoh Panduan Sistem.png';

            % Create Panel
            app.Panel = uipanel(app.UIFigure);
            app.Panel.Position = [1 428 640 53];

            % Create Label
            app.Label = uilabel(app.Panel);
            app.Label.HorizontalAlignment = 'center';
            app.Label.FontSize = 18;
            app.Label.FontWeight = 'bold';
            app.Label.Position = [247 15 146 22];
            app.Label.Text = 'Panduan Sistem';

            % Create Label_2
            app.Label_2 = uilabel(app.UIFigure);
            app.Label_2.HorizontalAlignment = 'center';
            app.Label_2.FontSize = 7;
            app.Label_2.FontWeight = 'bold';
            app.Label_2.Position = [126 321 92 32];
            app.Label_2.Text = {'Tombol ''Pilih Citra'' '; 'digunakan untuk '; 'mengambil citra batik '; 'di penyimpanan komputer'};

            % Create Label_3
            app.Label_3 = uilabel(app.UIFigure);
            app.Label_3.HorizontalAlignment = 'center';
            app.Label_3.FontSize = 7;
            app.Label_3.FontWeight = 'bold';
            app.Label_3.Position = [1 266 140 40];
            app.Label_3.Text = {'Tombol ''Proses Citra'''; 'digunakan untuk mengubah '; 'citra dari warna RGB menjadi Grayscale '; 'dan memotong gambar untuk fokus '; 'pada motif batik yang akan diambil'};

            % Create Label_4
            app.Label_4 = uilabel(app.UIFigure);
            app.Label_4.HorizontalAlignment = 'center';
            app.Label_4.FontSize = 7;
            app.Label_4.FontWeight = 'bold';
            app.Label_4.Position = [1 206 116 24];
            app.Label_4.Text = {'Tombol ''Ekstraksi Citra'' '; 'digunakan untuk menghitung '; 'fitur GLCM pada citra motif batik.'};

            % Create Label_5
            app.Label_5 = uilabel(app.UIFigure);
            app.Label_5.HorizontalAlignment = 'center';
            app.Label_5.FontSize = 7;
            app.Label_5.FontWeight = 'bold';
            app.Label_5.Position = [7 130 104 40];
            app.Label_5.Text = {'Tombol ''Klasifikasi'' '; 'digunakan untuk memproses '; 'klasifikasi KNN berdasarkan '; 'hasil ekstraksi GLCM '; 'dan kelas citra batik.'};

            % Create Label_6
            app.Label_6 = uilabel(app.UIFigure);
            app.Label_6.HorizontalAlignment = 'center';
            app.Label_6.FontSize = 7;
            app.Label_6.FontWeight = 'bold';
            app.Label_6.Position = [-1 61 118 32];
            app.Label_6.Text = {'Tombol ''Reset'' '; 'digunakan untuk mengembalikan '; 'sistem ke kondisi awal '; 'agar siap mengolah citra baru.'};

            % Create Label_7
            app.Label_7 = uilabel(app.UIFigure);
            app.Label_7.HorizontalAlignment = 'center';
            app.Label_7.FontSize = 7;
            app.Label_7.FontWeight = 'bold';
            app.Label_7.Position = [116 20 70 24];
            app.Label_7.Text = {'Tombol ''Kembali'' '; 'digunakan untuk'; 'kembali ke beranda'};

            % Create Label_8
            app.Label_8 = uilabel(app.UIFigure);
            app.Label_8.HorizontalAlignment = 'center';
            app.Label_8.FontSize = 7;
            app.Label_8.FontWeight = 'bold';
            app.Label_8.Position = [217 20 82 24];
            app.Label_8.Text = {'Tombol ''Data Latih'' '; 'digunakan untuk'; 'membaca file data latih'};

            % Create Label_9
            app.Label_9 = uilabel(app.UIFigure);
            app.Label_9.HorizontalAlignment = 'center';
            app.Label_9.FontSize = 7;
            app.Label_9.FontWeight = 'bold';
            app.Label_9.Position = [116 341 35 26];
            app.Label_9.Text = '1';

            % Create Label_10
            app.Label_10 = uilabel(app.UIFigure);
            app.Label_10.HorizontalAlignment = 'center';
            app.Label_10.FontSize = 7;
            app.Label_10.FontWeight = 'bold';
            app.Label_10.Position = [161 169 25 22];
            app.Label_10.Text = '1';

            % Create Label_11
            app.Label_11 = uilabel(app.UIFigure);
            app.Label_11.HorizontalAlignment = 'center';
            app.Label_11.FontSize = 7;
            app.Label_11.FontWeight = 'bold';
            app.Label_11.Position = [7 300 25 22];
            app.Label_11.Text = '2';

            % Create Label_12
            app.Label_12 = uilabel(app.UIFigure);
            app.Label_12.HorizontalAlignment = 'center';
            app.Label_12.FontSize = 7;
            app.Label_12.FontWeight = 'bold';
            app.Label_12.Position = [161 156 25 22];
            app.Label_12.Text = '2';

            % Create Label_13
            app.Label_13 = uilabel(app.UIFigure);
            app.Label_13.HorizontalAlignment = 'center';
            app.Label_13.FontSize = 7;
            app.Label_13.FontWeight = 'bold';
            app.Label_13.Position = [-1 221 25 22];
            app.Label_13.Text = '3';

            % Create Label_14
            app.Label_14 = uilabel(app.UIFigure);
            app.Label_14.HorizontalAlignment = 'center';
            app.Label_14.FontSize = 7;
            app.Label_14.FontWeight = 'bold';
            app.Label_14.Position = [161 134 25 36];
            app.Label_14.Text = '3';

            % Create Label_15
            app.Label_15 = uilabel(app.UIFigure);
            app.Label_15.HorizontalAlignment = 'center';
            app.Label_15.FontSize = 7;
            app.Label_15.FontWeight = 'bold';
            app.Label_15.Position = [7 156 25 35];
            app.Label_15.Text = '4';

            % Create Label_16
            app.Label_16 = uilabel(app.UIFigure);
            app.Label_16.HorizontalAlignment = 'center';
            app.Label_16.FontSize = 7;
            app.Label_16.FontWeight = 'bold';
            app.Label_16.Position = [161 121 25 31];
            app.Label_16.Text = '4';

            % Create Label_17
            app.Label_17 = uilabel(app.UIFigure);
            app.Label_17.HorizontalAlignment = 'center';
            app.Label_17.FontSize = 7;
            app.Label_17.FontWeight = 'bold';
            app.Label_17.Position = [7 80 41 30];
            app.Label_17.Text = '5';

            % Create Label_18
            app.Label_18 = uilabel(app.UIFigure);
            app.Label_18.HorizontalAlignment = 'center';
            app.Label_18.FontSize = 7;
            app.Label_18.FontWeight = 'bold';
            app.Label_18.Position = [161 109 25 26];
            app.Label_18.Text = '5';

            % Create Label_19
            app.Label_19 = uilabel(app.UIFigure);
            app.Label_19.HorizontalAlignment = 'center';
            app.Label_19.FontSize = 7;
            app.Label_19.FontWeight = 'bold';
            app.Label_19.Position = [103 32 25 31];
            app.Label_19.Text = '6';

            % Create Label_20
            app.Label_20 = uilabel(app.UIFigure);
            app.Label_20.HorizontalAlignment = 'center';
            app.Label_20.FontSize = 7;
            app.Label_20.FontWeight = 'bold';
            app.Label_20.Position = [161 96 25 22];
            app.Label_20.Text = '6';

            % Create Label_21
            app.Label_21 = uilabel(app.UIFigure);
            app.Label_21.HorizontalAlignment = 'center';
            app.Label_21.FontSize = 7;
            app.Label_21.FontWeight = 'bold';
            app.Label_21.Position = [208 32 25 31];
            app.Label_21.Text = '7';

            % Create Label_22
            app.Label_22 = uilabel(app.UIFigure);
            app.Label_22.HorizontalAlignment = 'center';
            app.Label_22.FontSize = 7;
            app.Label_22.FontWeight = 'bold';
            app.Label_22.Position = [161 81 25 22];
            app.Label_22.Text = '7';

            % Create Kembali
            app.Kembali = uibutton(app.UIFigure, 'push');
            app.Kembali.ButtonPushedFcn = createCallbackFcn(app, @KembaliButtonPushed, true);
            app.Kembali.BackgroundColor = [0.9412 0.9412 0.9412];
            app.Kembali.FontSize = 10;
            app.Kembali.FontWeight = 'bold';
            app.Kembali.Position = [544 17 80 30];
            app.Kembali.Text = {'Kembali'; ''};

            % Show the figure after all components are created
            app.UIFigure.Visible = 'on';
        end
    end

    % App creation and deletion
    methods (Access = public)

        % Construct app
        function app = PanduanSistem

            % Create UIFigure and components
            createComponents(app)

            % Register the app with App Designer
            registerApp(app, app.UIFigure)

            if nargout == 0
                clear app
            end
        end

        % Code that executes before app deletion
        function delete(app)

            % Delete UIFigure when app is deleted
            delete(app.UIFigure)
        end
    end
end