function varargout = Bangun_Datar(varargin)
% BANGUN_DATAR M-file for Bangun_Datar.fig
% BANGUN_DATAR, by itself, creates a new BANGUN_DATAR or raises the existing
% singleton*.
%
% H = BANGUN_DATAR returns the handle to a new BANGUN_DATAR or the handle to
% the existing singleton*.
%
% BANGUN_DATAR('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in BANGUN_DATAR.M with the given input arguments.
%
% BANGUN_DATAR('Property','Value',...) creates a new BANGUN_DATAR or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before Bangun_Datar_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to Bangun_Datar_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help Bangun_Datar
% Last Modified by GUIDE v2.5 12-Sep-2007 15:19:29
% Begin initialization code - DO NOT EDIT gui_Singleton = 1;
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
function matikan(off) set(off,'Value',0);
% --- Executes just before Bangun_Datar is made visible.
function Bangun_Datar_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to Bangun_Datar (see VARARGIN)
% Choose default command line output for Bangun_Datar handles.output = hObject;
% Update handles structure guidata(hObject, handles);
% UIWAIT makes Bangun_Datar wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = Bangun_Datar_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure varargout{1} = handles.output;
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit2_Callback(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit2 as text
% --- Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in TombSelesai.
function TombSelesai_Callback(hObject, eventdata, handles)
% hObject handle to TombSelesai (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA) close;
% --- Executes on button press in PilEmpat.
function PilEmpat_Callback(hObject, eventdata, handles)
% hObject handle to PilEmpat (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA) nil1=get(handles.PilEmpat,'value');
if nil1==1
set(handles.text2,'string','');
set(handles.text3,'string','Panjang');
set(handles.text4,'string','Lebar');
set(handles.text5,'string','Menghitung Keliling dan Luas pada Segi Empat');
set(handles.text6,'string','');
set(handles.text7,'string','');
set(handles.text8,'string','');
set(handles.text9,'string','');
set(handles.text10,'string','Keliling = 2 x (panjang + lebar)');
set(handles.text11,'string','Luas = panjang x Lebar');
set(handles.edit1,'string','');
set(handles.edit2,'string','');
set(handles.edit3,'string','');
set(handles.edit4,'string','');
set(handles.PilTiga,'value',0);
set(handles.PilLay,'value',0);
set(handles.PilLing,'value',0);
set(handles.PilTrap,'value',0);
set(handles.PilGen,'value',0);
end
% Hint: get(hObject,'Value') returns toggle state of PilEmpat
% --- Executes on button press in PilTiga.
function PilTiga_Callback(hObject, eventdata, handles)
% hObject handle to PilTiga (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA) nil2=get(handles.PilTiga,'value');
if nil2==1
set(handles.text2,'string','Sisi');
set(handles.text3,'string','Tinggi');
set(handles.text4,'string','');
set(handles.text5,'string','Menghitung Keliling dan Luas pada Segi Tiga');
set(handles.text6,'string','Sisi Alas');
set(handles.text7,'string','Sisi 2');
set(handles.text8,'string','Sisi 3');
set(handles.text9,'string','');
set(handles.text10,'string','Keliling = Sisi Alas + Sisi 2 + Sisi 3 ');
set(handles.text11,'string','Luas = 1/2 x Sisi Alas x Tinggi');
set(handles.edit1,'string','');
set(handles.edit2,'string','');
set(handles.edit3,'string','');
set(handles.edit4,'string','');
set(handles.edit5,'string','');
set(handles.edit6,'string','');
set(handles.EdKel,'string','');
set(handles.EdLuas,'string','');
set(handles.PilEmpat,'value',0);
set(handles.PilLay,'value',0);
set(handles.PilLing,'value',0);
set(handles.PilTrap,'value',0);
set(handles.PilGen,'value',0);
end
% Hint: get(hObject,'Value') returns toggle state of PilTiga
% --- Executes on button press in PilLay.
function PilLay_Callback(hObject, eventdata, handles)
% hObject handle to PilLay (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA) nil3=get(handles.PilLay,'value');
if nil3==1
set(handles.text2,'string','Sisi');
set(handles.text3,'string','Diagonal 1');
set(handles.text4,'string','Diagonal 2');
set(handles.text5,'string','Menghitung Keliling dan Luas pada Layang-Layang');
set(handles.text6,'string','Sisi 1');
set(handles.text7,'string','Sisi 2');
set(handles.text8,'string','Sisi 3');
set(handles.text9,'string','Sisi 4');
set(handles.text10,'string','Keliling = Sisi 1 + Sisi 2 + Sisi 3 + Sisi 4');
set(handles.text11,'string','Luas = 1/2 x (Diagonal 1 x Diagonal 2)');
set(handles.edit1,'string','');
set(handles.edit2,'string','');
set(handles.edit3,'string','');
set(handles.edit4,'string','');
set(handles.edit5,'string','');
set(handles.edit6,'string','');
set(handles.EdKel,'string','');
set(handles.EdLuas,'string','');
set(handles.PilEmpat,'value',0);
set(handles.PilTiga,'value',0);
set(handles.PilLing,'value',0);
set(handles.PilTrap,'value',0);
set(handles.PilGen,'value',0);
end
% Hint: get(hObject,'Value') returns toggle state of PilLay
% --- Executes on button press in PilLing.
function PilLing_Callback(hObject, eventdata, handles)
% hObject handle to PilLing (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA) nil4=get(handles.PilLing,'value');
if nil4==1
set(handles.text2,'string','');
set(handles.text3,'string','Jari-Jari');
set(handles.text4,'string','');
set(handles.text5,'string','Menghitung Keliling dan Luas pada Lingkaran');
set(handles.text6,'string','');
set(handles.text7,'string','');
set(handles.text8,'string','');
set(handles.text9,'string','');
set(handles.text10,'string','Keliling = 2 x pi x Jari-Jari ; pi = 3,1416...');
set(handles.text11,'string','Luas = pi x Jari-jari x Jari-Jari');
set(handles.edit1,'string','');
set(handles.edit2,'string','');
set(handles.edit3,'string','');
set(handles.edit4,'string','');
set(handles.edit5,'string','');
set(handles.edit6,'string','');
set(handles.EdKel,'string','');
set(handles.EdLuas,'string','');
set(handles.PilEmpat,'value',0);
set(handles.PilTiga,'value',0);
set(handles.PilLay,'value',0);
set(handles.PilTrap,'value',0);
set(handles.PilGen,'value',0);
end
% Hint: get(hObject,'Value') returns toggle state of PilLing
% --- Executes on button press in PilTrap.
function PilTrap_Callback(hObject, eventdata, handles)
% hObject handle to PilTrap (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA) nil5=get(handles.PilTrap,'value');
if nil5==1
set(handles.text2,'string','Sisi');
set(handles.text3,'string','Tinggi');
set(handles.text4,'string','');
set(handles.text5,'string','Menghitung Keliling dan Luas pada Trapesium');
set(handles.text6,'string','Sisi Alas');
set(handles.text7,'string','Sisi Atas');
set(handles.text8,'string','Sisi 3');
set(handles.text9,'string','Sisi 4');
set(handles.text10,'string','Keliling = Sisi Alas + Sisi Atas + Sisi 3 + Sisi 4');
set(handles.text11,'string','Luas = 1/2 x (Sisi Alas x Sisi Atas) x Tinggi');
set(handles.edit1,'string','');
set(handles.edit2,'string','');
set(handles.edit3,'string','');
set(handles.edit4,'string','');
set(handles.edit5,'string','');
set(handles.edit6,'string','');
set(handles.EdKel,'string','');
set(handles.EdLuas,'string','');
set(handles.PilEmpat,'value',0);
set(handles.PilTiga,'value',0);
set(handles.PilLay,'value',0);
set(handles.PilLing,'value',0);
set(handles.PilGen,'value',0);
end
% Hint: get(hObject,'Value') returns toggle state of PilTrap
% --- Executes on button press in PilGen.
function PilGen_Callback(hObject, eventdata, handles)
% hObject handle to PilGen (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA) nil6=get(handles.PilGen,'value');
if nil6==1
set(handles.text2,'string','Sisi');
set(handles.text3,'string','Tinggi');
set(handles.text4,'string','');
set(handles.text5,'string','Menghitung Keliling dan Luas pada Jajaran Genjang');
set(handles.text6,'string','Sisi Alas');
set(handles.text7,'string','Sisi Atas');
set(handles.text8,'string','Sisi 3');
set(handles.text9,'string','Sisi 4');
set(handles.text10,'string','Keliling = Sisi Alas + Sisi Atas + Sisi 3 + Sisi 4');
set(handles.text11,'string','Luas = Sisi Alas x Tinggi');
set(handles.edit1,'string','');
set(handles.edit2,'string','');
set(handles.edit3,'string','');
set(handles.edit4,'string','');
set(handles.edit5,'string','');
set(handles.edit6,'string','');
set(handles.EdKel,'string','');
set(handles.EdLuas,'string','');
set(handles.PilEmpat,'value',0);
set(handles.PilTiga,'value',0);
set(handles.PilLay,'value',0);
set(handles.PilLing,'value',0);
set(handles.PilTrap,'value',0);
end
% Hint: get(hObject,'Value') returns toggle state of PilGen
function EdKel_Callback(hObject, eventdata, handles)
% hObject handle to EdKel (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of EdKel as text
% str2double(get(hObject,'String')) returns contents of EdKel as a double
% --- Executes during object creation, after setting all properties.
function EdKel_CreateFcn(hObject, eventdata, handles)
% hObject handle to EdKel (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function EdLuas_Callback(hObject, eventdata, handles)
% hObject handle to EdLuas (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of EdLuas as text
% str2double(get(hObject,'String')) returns contents of EdLuas as a double
% --- Executes during object creation, after setting all properties.
function EdLuas_CreateFcn(hObject, eventdata, handles)
% hObject handle to EdLuas (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
% --- Executes on button press in TombReset.
function TombReset_Callback(hObject, eventdata, handles)
% hObject handle to TombReset (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA) set(handles.edit1,'string','');
% --- Executes on button press in TombKel.
function TombKel_Callback(hObject, eventdata, handles)
% hObject handle to TombKel (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA) nil1=get(handles.PilEmpat,'value');
% --- Executes on button press in TombLuas.
function TombLuas_Callback(hObject, eventdata, handles)
% hObject handle to TombLuas (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA) nil1=get(handles.PilEmpat,'value');
elseif nil5==1
function edit3_Callback(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit3 as text
% str2double(get(hObject,'String')) returns contents of edit3 as a double
% --- Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit7_Callback(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit2 as text
% str2double(get(hObject,'String')) returns contents of edit2 as a double
% --- Executes during object creation, after setting all properties.
function edit7_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit8_Callback(hObject, eventdata, handles)
% hObject handle to edit8 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit8 as text
% str2double(get(hObject,'String')) returns contents of edit8 as a double
% --- Executes during object creation, after setting all properties.
function edit8_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit8 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
function edit4_Callback(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit4 as text
% str2double(get(hObject,'String')) returns contents of edit4 as a double
% --- Executes during object creation, after setting all properties.
function edit4_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit5_Callback(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit5 as text
% str2double(get(hObject,'String')) returns contents of edit5 as a double
% --- Executes during object creation, after setting all properties.
function edit5_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit6_Callback(hObject, eventdata, handles)
% hObject handle to edit6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit6 as text
% str2double(get(hObject,'String')) returns contents of edit6 as a double
% --- Executes during object creation, after setting all properties.
function edit6_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes during object creation, after setting all properties.
function edit10_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit10 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% --- Executes during object creation, after setting all properties.
function edit11_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit11 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called